Changeset - r20818:9f808dc3fdaa
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2013-10-13 13:49:45
frosch@openttd.org
(svn r25862) -Fix [FS#5715] (r25729): Usage of implicit unsigned wrap around. (sbr)
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -1251,12 +1251,12 @@ void NWidgetHorizontal::AssignSizePositi
 
	NWidgetBase *child_wid = this->head;
 
	while (child_wid != NULL) {
 
		uint child_width = child_wid->current_x;
 
		uint child_x = x + position + (rtl ? -child_width - child_wid->padding_left : child_wid->padding_left);
 
		uint child_x = x + (rtl ? position - child_width - child_wid->padding_left : position + child_wid->padding_left);
 
		uint child_y = y + child_wid->padding_top;
 

	
 
		child_wid->AssignSizePosition(sizing, child_x, child_y, child_width, child_wid->current_y, rtl);
 
		uint padded_child_width = child_width + child_wid->padding_right + child_wid->padding_left;
 
		position += rtl ? -padded_child_width : padded_child_width;
 
		position = rtl ? position - padded_child_width : position + padded_child_width;
 

	
 
		child_wid = child_wid->next;
 
	}
0 comments (0 inline, 0 general)