diff options
author | Nicola Mettifogo | 2007-10-04 16:19:42 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-10-04 16:19:42 +0000 |
commit | 439c6e1d5310a40a4525620efb66ebb9ae142f4c (patch) | |
tree | a5f401f5227ea9699e135845d150596355ec6626 | |
parent | 51f082dcde8c6f1b5036f81ae7b504bcc291bced (diff) | |
download | scummvm-rg350-439c6e1d5310a40a4525620efb66ebb9ae142f4c.tar.gz scummvm-rg350-439c6e1d5310a40a4525620efb66ebb9ae142f4c.tar.bz2 scummvm-rg350-439c6e1d5310a40a4525620efb66ebb9ae142f4c.zip |
Fixed bug #1803287. The inner block was changing the test condition causing unwanted behavior.
svn-id: r29155
-rw-r--r-- | engines/parallaction/objects.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index 283802ef45..1a36bcd5f7 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -385,10 +385,14 @@ FixedTable::FixedTable(uint32 size, uint32 fixed) : Table(size), _numFixed(fixed } void FixedTable::clear() { + uint32 deleted = 0; for (uint32 i = _numFixed; i < _used; i++) { free(_data[i]); - _used--; + _data[i] = 0; + deleted++; } + + _used -= deleted; } Table* createTableFromStream(uint32 size, Common::SeekableReadStream &stream) { |