diff -ur --exclude=CVS ScummVM/scumm/resource.cpp ScummVM+hack/scumm/resource.cpp
old
|
new
|
|
2111 | 2111 | _numLocalObjects = _fileHandle.readUint16LE(); // 200 |
2112 | 2112 | _numArray = 50; |
2113 | 2113 | _numVerbs = 100; |
2114 | | _numNewNames = 50; |
| 2114 | // 50 isn't enough for MI2. See bug #936323. |
| 2115 | _numNewNames = (_gameId == GID_MONKEY2) ? 100 : 50; |
2115 | 2116 | _objectRoomTable = NULL; |
2116 | 2117 | |
2117 | 2118 | _fileHandle.readUint16LE(); // 50 |
diff -ur --exclude=CVS ScummVM/scumm/saveload.cpp ScummVM+hack/scumm/saveload.cpp
old
|
new
|
|
823 | 823 | _inventory[idx] = ser->loadUint16(); |
824 | 824 | } |
825 | 825 | if (type == rtObjectName && ser->getVersion() >= VER(25)) { |
826 | | _newNames[idx] = ser->loadUint16(); |
| 826 | // Paranoia: We increased the possible number of new names |
| 827 | // for MI2 to fix bug #936323. The savegame format didn't |
| 828 | // change, but at least during the transition period there |
| 829 | // is a slight chance that we try to load more names than |
| 830 | // we have allocated space for. If so, discard them. |
| 831 | if (idx < _numNewNames) |
| 832 | _newNames[idx] = ser->loadUint16(); |
827 | 833 | } |
828 | 834 | } |
829 | 835 | } |