From 41238c8f7ab88b2f3ef51a5e1ead58d3ba505c5b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Oct 2013 16:35:01 +0300 Subject: add missing initialisation in mapreader. --- src/resources/mapreader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/resources') diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 1382e66af..95da2ae36 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -193,7 +193,7 @@ Map *MapReader::readMap(const std::string &filename, return createEmptyMap(filename, realFilename); } - unsigned char *inflated; + unsigned char *inflated = nullptr; unsigned int inflatedSize; if (realFilename.find(".gz", realFilename.length() - 3) @@ -563,7 +563,7 @@ bool MapReader::readBase64Layer(const XmlNodePtr childNode, Map *const map, if (compression == "gzip" || compression == "zlib") { // Inflate the gzipped layer data - unsigned char *inflated; + unsigned char *inflated = nullptr; const unsigned int inflatedSize = inflateMemory(binData, binLen, inflated); -- cgit v1.2.3-70-g09d2