[Scummvm-git-logs] scummvm master -> e60e0b8f20f8ff05a355ee8ac0fb7d8c2bc35668
bluegr
bluegr at gmail.com
Sat May 1 18:11:54 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5dbcf6f739 TINSEL: Fix numPolygons read on big-endian systems
e60e0b8f20 TINSEL: Fix uninitialized numPolygons value for Discworld 1 Floppy Demo V0
Commit: 5dbcf6f7399a9a9e64487289f9f77f28cacaa3c0
https://github.com/scummvm/scummvm/commit/5dbcf6f7399a9a9e64487289f9f77f28cacaa3c0
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2021-05-01T21:11:52+03:00
Commit Message:
TINSEL: Fix numPolygons read on big-endian systems
Changed paths:
engines/tinsel/tinsel.cpp
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 6275420d45..3100d9ee3f 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -764,7 +764,7 @@ GameChunk createGameChunkV2() {
cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_TOTAL_POLY);
if (cptr != NULL)
- chunk.numPolygons = *cptr;
+ chunk.numPolygons = READ_32(cptr);
if (TinselV2) {
cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_NUM_PROCESSES);
Commit: e60e0b8f20f8ff05a355ee8ac0fb7d8c2bc35668
https://github.com/scummvm/scummvm/commit/e60e0b8f20f8ff05a355ee8ac0fb7d8c2bc35668
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2021-05-01T21:11:52+03:00
Commit Message:
TINSEL: Fix uninitialized numPolygons value for Discworld 1 Floppy Demo V0
numPolygons was left uninitialized for the original V0 demo, so it could be
set to a big value which would trigger assert(numPolys <= MAX_POLY) in
MaxPolygons() and immediately crash the game.
This restores the implicit behavior before commit 24b77f1e994.
Changed paths:
engines/tinsel/tinsel.cpp
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 3100d9ee3f..59a14814fa 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -763,8 +763,7 @@ GameChunk createGameChunkV2() {
chunk.numObjects = (cptr != NULL) ? READ_32(cptr) : 0;
cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_TOTAL_POLY);
- if (cptr != NULL)
- chunk.numPolygons = READ_32(cptr);
+ chunk.numPolygons = (cptr != NULL) ? READ_32(cptr) : 0;
if (TinselV2) {
cptr = FindChunk(MASTER_SCNHANDLE, CHUNK_NUM_PROCESSES);
@@ -815,7 +814,7 @@ void LoadBasicChunks() {
_vm->_dialogs->RegisterIcons(cptr, game.numObjects);
- // Max polygons are 0 in DW1 Mac (both in the demo and the full version)
+ // Max polygons are 0 in the original DW1 V0 demo and in DW1 Mac (both in the demo and the full version)
if (game.numPolygons != 0)
MaxPolygons(game.numPolygons);
More information about the Scummvm-git-logs
mailing list