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:
parent
122db9963b
commit
6427827b33
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user