[Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse_bndmgr.cpp,1.10,1.11
Pawel Kolodziejski
aquadran at users.sourceforge.net
Thu Jan 8 15:18:05 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm/imuse_digi
In directory sc8-pr-cvs1:/tmp/cvs-serv4205
Modified Files:
dimuse_bndmgr.cpp
Log Message:
revert - comp_input can be more than 0x2000 size
Index: dimuse_bndmgr.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi/dimuse_bndmgr.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- dimuse_bndmgr.cpp 8 Jan 2004 15:48:41 -0000 1.10
+++ dimuse_bndmgr.cpp 8 Jan 2004 23:17:54 -0000 1.11
@@ -206,12 +206,10 @@
int skip = offset - (first_block * 0x2000) + header_size;
- // CMI hack: one more zero byte at the end of input buffer
- comp_input = (byte *)malloc(0x2000);
- comp_input[0x2000-1] = 0;
-
for (i = first_block; i <= last_block; i++) {
- assert(0x2000 >= _compTable[i].size + 1);
+ // CMI hack: one more zero byte at the end of input buffer
+ comp_input = (byte *)malloc(_compTable[i].size + 1);
+ comp_input[_compTable[i].size] = 0;
byte *curBuf;
if (_lastBlock != i) {
@@ -239,11 +237,11 @@
final_size += output_size;
size -= output_size;
assert(size >= 0);
+ free(comp_input);
if (size == 0)
break;
skip = 0;
}
- free(comp_input);
free(comp_output);
return final_size;
More information about the Scummvm-git-logs
mailing list