diff options
Diffstat (limited to 'backends/saves/compressed')
-rw-r--r-- | backends/saves/compressed/compressed-saves.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/backends/saves/compressed/compressed-saves.cpp b/backends/saves/compressed/compressed-saves.cpp index 431caf2a08..183e8dd355 100644 --- a/backends/saves/compressed/compressed-saves.cpp +++ b/backends/saves/compressed/compressed-saves.cpp @@ -244,7 +244,9 @@ public: return 0; // Hook in the new data ... - _stream.next_in = (Bytef*)dataPtr; + // Note: We need to make a const_cast here, as zlib is not aware + // of the const keyword. + _stream.next_in = const_cast<byte *>((const byte *)dataPtr); _stream.avail_in = dataSize; // ... and flush it to disk |