mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	- fixed (at least partially) #1100
This commit is contained in:
		| @@ -509,7 +509,7 @@ TInputStreamPtr Mapa::getMapStream(std::string URI) | ||||
| 	ui32 header = reader.readUInt32(); | ||||
| 	file->seek(0); //reset file | ||||
|  | ||||
| 	switch (header) | ||||
| 	switch (header & 0xffffff) // gzip header is 3 bytes only in size | ||||
| 	{ | ||||
| 		case 0x00088B1F: // gzip header magic number, reversed for LE | ||||
| 			return TInputStreamPtr(new CCompressedStream(std::move(file), true)); | ||||
| @@ -519,6 +519,7 @@ TInputStreamPtr Mapa::getMapStream(std::string URI) | ||||
| 		case CMapHeader::SoD : | ||||
| 			return file; | ||||
| 		default : | ||||
| 			tlog0 << "Error: Failed to open map " << URI << ": unknown format\n"; | ||||
| 			return TInputStreamPtr(); | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user