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:
@ -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);
|
||||
|
Reference in New Issue
Block a user