Added a proper fix for bug - "FW: crash in copier room", taken from next_ghost's patch - "ScriptVars class implementation for CinE"

svn-id: r29852
This commit is contained in:
Filippos Karapetis 2007-12-13 17:53:31 +00:00
parent 3240d0636a
commit ee56120fcf
2 changed files with 3 additions and 7 deletions
engines/cine

View File

@ -36,7 +36,7 @@
namespace Cine {
objectStruct objectTable[NUM_MAX_OBJECT];
uint16 globalVars[NUM_MAX_OBJECTDATA];
uint16 globalVars[NUM_MAX_OBJECTDATA + 1];
overlayHeadElement overlayHead;
void unloadAllMasks(void) {
@ -151,11 +151,7 @@ int16 freeOverlay(uint16 objIdx, uint16 param) {
tempPtr2->previous = currentHeadPtr->previous;
// FIXME: is this needed? It causes crashes in Windows in the drawOverlays function
// (the currentOverlay pointer is incorrect)
// Removing this fixes bug #1733238 - FW: crash in copier room
// Also, it stops the game from crashing right after the introduction
//free(currentHeadPtr);
free(currentHeadPtr);
return 0;
}

View File

@ -53,7 +53,7 @@ struct overlayHeadElement {
#define NUM_MAX_OBJECTDATA 255
extern objectStruct objectTable[NUM_MAX_OBJECT];
extern uint16 globalVars[NUM_MAX_OBJECTDATA];
extern uint16 globalVars[NUM_MAX_OBJECTDATA + 1];
extern overlayHeadElement overlayHead;