diff options
author | David Corrales | 2007-05-31 23:44:43 +0000 |
---|---|---|
committer | David Corrales | 2007-05-31 23:44:43 +0000 |
commit | 0cab5b7791e56b32455748bf20c21f0d6b42f654 (patch) | |
tree | 9e6580328542f1db230e019ba77e3db1be8fa50b /engines/cine/msg.cpp | |
parent | 6c69d531d262e14fa02b6e1adb42baaa5c74dbe6 (diff) | |
parent | 22c0403e0dfec16badf156afa842c6c37e850263 (diff) | |
download | scummvm-rg350-0cab5b7791e56b32455748bf20c21f0d6b42f654.tar.gz scummvm-rg350-0cab5b7791e56b32455748bf20c21f0d6b42f654.tar.bz2 scummvm-rg350-0cab5b7791e56b32455748bf20c21f0d6b42f654.zip |
Merged the fs branch with trunk. r26949:27031
svn-id: r27032
Diffstat (limited to 'engines/cine/msg.cpp')
-rw-r--r-- | engines/cine/msg.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/engines/cine/msg.cpp b/engines/cine/msg.cpp index 691c024259..3f5f33fc40 100644 --- a/engines/cine/msg.cpp +++ b/engines/cine/msg.cpp @@ -1,7 +1,8 @@ -/* ScummVM - Scumm Interpreter - * Copyright (C) 2006 The ScummVM project +/* ScummVM - Graphic Adventure Engine * - * cinE Engine is (C) 2004-2005 by CinE Team + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -34,7 +35,7 @@ uint16 messageCount; void loadMsg(char *pMsgName) { uint16 i; - byte *ptr; + byte *ptr, *dataPtr; checkDataDisk(-1); @@ -42,17 +43,13 @@ void loadMsg(char *pMsgName) { for (i = 0; i < NUM_MAX_MESSAGE; i++) { messageTable[i].len = 0; - if (messageTable[i].ptr) { - assert(messageTable[i].ptr); - free(messageTable[i].ptr); + messageTable[i].ptr = NULL; } - - messageTable[i].ptr = NULL; } - ptr = readBundleFile(findFileInBundle(pMsgName)); + ptr = dataPtr = readBundleFile(findFileInBundle(pMsgName)); setMouseCursor(MOUSE_CURSOR_DISK); @@ -74,6 +71,8 @@ void loadMsg(char *pMsgName) { ptr += messageTable[i].len; } } + + free(dataPtr); } } // End of namespace Cine |