1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Fixed extremely slow parsing of maps directory

This commit is contained in:
Ivan Savenko 2013-12-06 09:13:55 +00:00
parent 122db9963b
commit 6427827b33

View File

@ -141,10 +141,11 @@ void CMapLoaderH3M::init()
void CMapLoaderH3M::readHeader()
{
// Check map for validity
if(inputStream->getSize() < 50)
{
throw std::runtime_error("Corrupted map file.");
}
// Note: disabled, causes decompression of the entire file ( = SLOW)
//if(inputStream->getSize() < 50)
//{
// throw std::runtime_error("Corrupted map file.");
//}
// Map version
mapHeader->version = (EMapFormat::EMapFormat)(reader.readUInt32());