diff options
author | Eugene Sandulenko | 2006-01-29 02:27:10 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-01-29 02:27:10 +0000 |
commit | 4780ab9223293243fdeadbda490eeea25aba2072 (patch) | |
tree | 9cbf33b790e67b8ca89cd59195f183075e7767cd /gob/pack.cpp | |
parent | bdac3715992d457e30eb3874ac47a60e4632acb7 (diff) | |
download | scummvm-rg350-4780ab9223293243fdeadbda490eeea25aba2072.tar.gz scummvm-rg350-4780ab9223293243fdeadbda490eeea25aba2072.tar.bz2 scummvm-rg350-4780ab9223293243fdeadbda490eeea25aba2072.zip |
Patch #1417631: "gobliiins cleanup". Thanks, wjp.
svn-id: r20283
Diffstat (limited to 'gob/pack.cpp')
-rw-r--r-- | gob/pack.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gob/pack.cpp b/gob/pack.cpp index 546618f08c..4728a599bf 100644 --- a/gob/pack.cpp +++ b/gob/pack.cpp @@ -40,7 +40,7 @@ int32 Pack::unpackData(char *sourceBuf, char *destBuf) { realSize = READ_LE_UINT32(sourceBuf); counter = READ_LE_UINT32(sourceBuf); - tmpBuf = (byte *)malloc(4114); + tmpBuf = new byte[4114]; /* * Can use assembler unpacker for small blocks - for speed. @@ -91,7 +91,7 @@ int32 Pack::unpackData(char *sourceBuf, char *destBuf) { *dest++ = tmpBuf[(off + i) % 4096]; counter--; if (counter == 0) { - free(tmpBuf); + delete[] tmpBuf; return realSize; } tmpBuf[tmpIndex] = tmpBuf[(off + i) % 4096]; @@ -100,7 +100,7 @@ int32 Pack::unpackData(char *sourceBuf, char *destBuf) { } } } - free(tmpBuf); + delete[] tmpBuf; return realSize; } |