aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/draw.cpp
diff options
context:
space:
mode:
authorMax Horn2009-06-06 21:37:30 +0000
committerMax Horn2009-06-06 21:37:30 +0000
commit3d3da173b05a6a45ea909aca790bd04c2286dd88 (patch)
treef94cad0ea544db1df4bb06bcac78866c0c5c4043 /engines/gob/draw.cpp
parentfd94eeead06d99d087197e9b4251ebf7507a5bbd (diff)
downloadscummvm-rg350-3d3da173b05a6a45ea909aca790bd04c2286dd88.tar.gz
scummvm-rg350-3d3da173b05a6a45ea909aca790bd04c2286dd88.tar.bz2
scummvm-rg350-3d3da173b05a6a45ea909aca790bd04c2286dd88.zip
GOB: Turned _spritesArray into a Common::Array (of fixed size) to detect out-of-bounds access to it (since access is controlled by scripts, this could (and does :/) easily happen. Also removed an obsolete swap() method, and fixed one case where _spritesArray was indeed accessed out of bounds
svn-id: r41305
Diffstat (limited to 'engines/gob/draw.cpp')
-rw-r--r--engines/gob/draw.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp
index 3ec9b8b436..8619e08e8b 100644
--- a/engines/gob/draw.cpp
+++ b/engines/gob/draw.cpp
@@ -62,6 +62,8 @@ Draw::Draw(GobEngine *vm) : _vm(vm) {
for (int i = 0; i < 8; i++)
_fonts[i] = 0;
+ _spritesArray.resize(SPRITES_COUNT);
+
_invalidatedCount = 0;
for (int i = 0; i < 30; i++) {
_invalidatedTops[i] = 0;