(svn r19674) -Fix [FS#3774]: crash when the music/graphics metadata files were unreadable

This commit is contained in:
rubidium
2010-04-19 09:34:56 +00:00
parent 3442b8c345
commit 83e40b8ced
4 changed files with 17 additions and 15 deletions

View File

@@ -202,9 +202,9 @@ void GfxLoadSprites()
GfxInitPalettes();
}
bool GraphicsSet::FillSetDetails(IniFile *ini, const char *path)
bool GraphicsSet::FillSetDetails(IniFile *ini, const char *path, const char *full_filename)
{
bool ret = this->BaseSet<GraphicsSet, MAX_GFT, DATA_DIR>::FillSetDetails(ini, path, false);
bool ret = this->BaseSet<GraphicsSet, MAX_GFT, DATA_DIR>::FillSetDetails(ini, path, full_filename, false);
if (ret) {
IniGroup *metadata = ini->GetGroup("metadata");
IniItem *item;
@@ -212,7 +212,7 @@ bool GraphicsSet::FillSetDetails(IniFile *ini, const char *path)
fetch_metadata("palette");
this->palette = (*item->value == 'D' || *item->value == 'd') ? PAL_DOS : PAL_WINDOWS;
}
return true;
return ret;
}