diff --git a/src/farchive.cpp b/src/farchive.cpp index a589df50a..ac6c88631 100644 --- a/src/farchive.cpp +++ b/src/farchive.cpp @@ -402,14 +402,11 @@ void FCompressedFile::Explode () uLong newlen; newlen = expandsize; - _heapchk(); r = uncompress (expand, &newlen, m_Buffer + 8, cprlen); if (r != Z_OK || newlen != expandsize) { - _heapchk(); M_Free (expand); - _heapchk(); - I_Error ("Could not decompress buffer: %s", M_ZLibError(r)); + I_Error ("Could not decompress buffer: %s", M_ZLibError(r).GetChars()); } } else diff --git a/src/files.cpp b/src/files.cpp index d205429e1..80f0f8303 100644 --- a/src/files.cpp +++ b/src/files.cpp @@ -224,7 +224,7 @@ FileReaderZ::FileReaderZ (FileReader &file, bool zip) if (err != Z_OK) { - I_Error ("FileReaderZ: inflateInit failed: %s\n", M_ZLibError(err)); + I_Error ("FileReaderZ: inflateInit failed: %s\n", M_ZLibError(err).GetChars()); } } diff --git a/src/g_game.cpp b/src/g_game.cpp index 3aa4d3059..3d18f8fad 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -2513,7 +2513,7 @@ bool G_ProcessIFFDemo (char *mapname) int r = uncompress (uncompressed, &uncompSize, demo_p, uLong(zdembodyend - demo_p)); if (r != Z_OK) { - Printf ("Could not decompress demo! %s\n", M_ZLibError(r)); + Printf ("Could not decompress demo! %s\n", M_ZLibError(r).GetChars()); delete[] uncompressed; return true; } diff --git a/src/i_net.cpp b/src/i_net.cpp index 5b0b35907..57543b29d 100644 --- a/src/i_net.cpp +++ b/src/i_net.cpp @@ -303,7 +303,7 @@ void PacketGet (void) // Printf("recv %d/%lu\n", c, msgsize + 1); if (err != Z_OK) { - Printf("Net decompression failed (zlib error %s)\n", M_ZLibError(err)); + Printf("Net decompression failed (zlib error %s)\n", M_ZLibError(err).GetChars()); // Pretend no packet doomcom.remotenode = -1; return;