From 857a35f7485b5594c280c0c597b3a876900e8aba Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 9 Oct 2009 10:32:33 +0000 Subject: Fixed all memory leaks as far as the initial title screen svn-id: r44814 --- engines/cruise/script.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/cruise/script.cpp') diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp index 1e2921fe5e..9ef9c686b1 100644 --- a/engines/cruise/script.cpp +++ b/engines/cruise/script.cpp @@ -540,13 +540,13 @@ uint8 *attacheNewScriptToTail(scriptInstanceStruct *scriptHandlePtr, int16 overl if (!tempPtr) return (NULL); - tempPtr->var6 = NULL; + tempPtr->data = NULL; if (var_C) { - tempPtr->var6 = (uint8 *) mallocAndZero(var_C); + tempPtr->data = (uint8 *) mallocAndZero(var_C); } - tempPtr->varA = var_C; + tempPtr->dataSize = var_C; tempPtr->nextScriptPtr = NULL; tempPtr->scriptOffset = 0; @@ -568,7 +568,7 @@ uint8 *attacheNewScriptToTail(scriptInstanceStruct *scriptHandlePtr, int16 overl oldTail->nextScriptPtr = tempPtr; // attache the new node to the list - return (tempPtr->var6); + return (tempPtr->data); } int executeScripts(scriptInstanceStruct *ptr) { @@ -608,7 +608,7 @@ int executeScripts(scriptInstanceStruct *ptr) { currentData3DataPtr = ptr2->dataPtr; - scriptDataPtrTable[1] = (uint8 *) ptr->var6; + scriptDataPtrTable[1] = (uint8 *) ptr->data; scriptDataPtrTable[2] = getDataFromData3(ptr2, 1); scriptDataPtrTable[5] = ovlData->data4Ptr; // free strings scriptDataPtrTable[6] = ovlData->ptr8; -- cgit v1.2.3