1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

* Reinstated music player. Added terrain music. To MSVC users: you need the recently uploaded libraries pack for this to work! [ http://download.vcmi.eu/msvc-pack.7z ]

* Not crash on empty (or 1-byte) lod file. (Case in SoD+WoG installations, where h3ab*.lod are dummies.
This commit is contained in:
Michał W. Urbańczyk
2011-08-17 20:44:14 +00:00
parent c0127032fc
commit a043bfa44a
4 changed files with 18 additions and 4 deletions

View File

@ -280,6 +280,11 @@ void CLodHandler::init(const std::string lodFile, const std::string dirName)
totalFiles = SDL_SwapLE32(temp);
LOD.seekg(0x5c, std::ios::beg);
if(!LOD)
{
tlog2 << lodFile << " doesn't store anything!\n";
return;
}
struct LodEntry *lodEntries = new struct LodEntry[totalFiles];
LOD.read((char *)lodEntries, sizeof(struct LodEntry) * totalFiles);