[Scummvm-cvs-logs] SF.net SVN: scummvm:[35549] scummvm/trunk/gui/ThemeLayout.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Dec 26 02:13:08 CET 2008


Revision: 35549
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35549&view=rev
Author:   fingolfin
Date:     2008-12-26 01:13:08 +0000 (Fri, 26 Dec 2008)

Log Message:
-----------
If more than 8 items have to be resized in a stacked theme layout, abort with an error (instead of silently trashing the stack)

Modified Paths:
--------------
    scummvm/trunk/gui/ThemeLayout.cpp

Modified: scummvm/trunk/gui/ThemeLayout.cpp
===================================================================
--- scummvm/trunk/gui/ThemeLayout.cpp	2008-12-26 01:08:49 UTC (rev 35548)
+++ scummvm/trunk/gui/ThemeLayout.cpp	2008-12-26 01:13:08 UTC (rev 35549)
@@ -161,6 +161,7 @@
 			_children[i]->setWidth((_w == -1 ? getParentW() : _w) - _padding.left - _padding.right);
 
 		if (_children[i]->getHeight() == -1) {
+			assert(rescount < ARRAYSIZE(resize));
 			resize[rescount++] = i;
 			_children[i]->setHeight(0);
 		}
@@ -209,6 +210,7 @@
 			_children[i]->setHeight((_h == -1 ? getParentH() : _h) - _padding.top - _padding.bottom);
 
 		if (_children[i]->getWidth() == -1) {
+			assert(rescount < ARRAYSIZE(resize));
 			resize[rescount++] = i;
 			_children[i]->setWidth(0);
 		}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list