Author: coolo Date: Tue Mar 2 13:39:04 2010 New Revision: 61093 URL: http://svn.opensuse.org/viewcvs/yast?rev=61093&view=rev Log: Fixing undefined behaviour that triggers a crash with gcc 4.5 (bnc#582088) Modified: trunk/libyui/VERSION trunk/libyui/package/yast2-libyui.changes trunk/libyui/src/YAlignment.cc Modified: trunk/libyui/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/VERSION?rev=61093&r1=61092&r2=61093&view=diff ============================================================================== --- trunk/libyui/VERSION (original) +++ trunk/libyui/VERSION Tue Mar 2 13:39:04 2010 @@ -1 +1 @@ -2.18.8 +2.19.0 Modified: trunk/libyui/package/yast2-libyui.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/package/yast2-libyui.changes?rev=61093&r1=61092&r2=61093&view=diff ============================================================================== --- trunk/libyui/package/yast2-libyui.changes (original) +++ trunk/libyui/package/yast2-libyui.changes Tue Mar 2 13:39:04 2010 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Mar 2 12:38:32 UTC 2010 - coolo@novell.com + +- Fixing undefined behaviour that triggers a crash with + gcc 4.5 (bnc#582088) +- V 2.19.0 + +------------------------------------------------------------------- Tue Feb 9 17:32:06 CET 2010 - tgoettlicher@suse.de - added license headers Modified: trunk/libyui/src/YAlignment.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/libyui/src/YAlignment.cc?rev=61093&r1=61092&r2=61093&view=diff ============================================================================== --- trunk/libyui/src/YAlignment.cc (original) +++ trunk/libyui/src/YAlignment.cc Tue Mar 2 13:39:04 2010 @@ -254,8 +254,8 @@ YBothDim<int> newChildSize; YBothDim<int> newChildPos; - - for ( YUIDimension dim = YD_HORIZ; dim <= YD_VERT; dim = (YUIDimension) (dim+1) ) + YUIDimension dim = YD_HORIZ; + while ( true ) // only toggle { int childPreferredSize = firstChild()->preferredSize( dim ); int preferredSize = childPreferredSize + totalMargin[ dim ]; @@ -317,6 +317,12 @@ } newChildPos[ dim ] += offset[ dim ]; + + // we need to get out of this loop after the second run + if (dim == YD_HORIZ) + dim = YD_VERT; + else + break; } firstChild()->setSize( newChildSize.hor, newChildSize.vert ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org