diff options
author | Max Horn | 2008-12-26 01:13:08 +0000 |
---|---|---|
committer | Max Horn | 2008-12-26 01:13:08 +0000 |
commit | 751df013e1fb8e521028f2babb1ff47067723c04 (patch) | |
tree | 764a99e5767bde4313699a88ee7c452bf93dfe8a | |
parent | 131cb5a05ac14f1608030437aed72883f4ddd0d3 (diff) | |
download | scummvm-rg350-751df013e1fb8e521028f2babb1ff47067723c04.tar.gz scummvm-rg350-751df013e1fb8e521028f2babb1ff47067723c04.tar.bz2 scummvm-rg350-751df013e1fb8e521028f2babb1ff47067723c04.zip |
If more than 8 items have to be resized in a stacked theme layout, abort with an error (instead of silently trashing the stack)
svn-id: r35549
-rw-r--r-- | gui/ThemeLayout.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gui/ThemeLayout.cpp b/gui/ThemeLayout.cpp index e56438aef6..be14671e69 100644 --- a/gui/ThemeLayout.cpp +++ b/gui/ThemeLayout.cpp @@ -161,6 +161,7 @@ void ThemeLayoutStacked::reflowLayoutV() { _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 @@ void ThemeLayoutStacked::reflowLayoutH() { _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); } |