mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 16:07:55 +00:00
- fixed memory allocation type mismatch in demo code.
This commit is contained in:
parent
afcd755c7a
commit
36911bac4b
1 changed files with 2 additions and 2 deletions
|
@ -2636,12 +2636,12 @@ bool G_ProcessIFFDemo (FString &mapname)
|
||||||
|
|
||||||
if (uncompSize > 0)
|
if (uncompSize > 0)
|
||||||
{
|
{
|
||||||
BYTE *uncompressed = new BYTE[uncompSize];
|
BYTE *uncompressed = (BYTE*)M_Malloc(uncompSize);
|
||||||
int r = uncompress (uncompressed, &uncompSize, demo_p, uLong(zdembodyend - demo_p));
|
int r = uncompress (uncompressed, &uncompSize, demo_p, uLong(zdembodyend - demo_p));
|
||||||
if (r != Z_OK)
|
if (r != Z_OK)
|
||||||
{
|
{
|
||||||
Printf ("Could not decompress demo! %s\n", M_ZLibError(r).GetChars());
|
Printf ("Could not decompress demo! %s\n", M_ZLibError(r).GetChars());
|
||||||
delete[] uncompressed;
|
M_Free(uncompressed);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
M_Free (demobuffer);
|
M_Free (demobuffer);
|
||||||
|
|
Loading…
Reference in a new issue