Skip to content

Commit

Permalink
Definitions: Report syntax errors in DD_DEFNS
Browse files Browse the repository at this point in the history
IssueID #2356
  • Loading branch information
skyjake committed Nov 30, 2019
1 parent fb58ec6 commit 8a515a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doomsday/apps/client/src/def_main.cpp
Expand Up @@ -375,7 +375,7 @@ static void Def_ReadLumpDefs()
if (!DED_ReadLump(DED_Definitions(), *i))
{
QByteArray path = NativePath(lumpIndex[*i].container().composePath()).pretty().toUtf8();
App_Error("Def_ReadLumpDefs: Parse error reading \"%s:DD_DEFNS\".\n", path.constData());
LOG_RES_ERROR("Parse error reading \"%s:DD_DEFNS\": %s") << path.constData() << DED_Error();
}
}

Expand Down
5 changes: 3 additions & 2 deletions doomsday/apps/libdoomsday/src/defs/dedfile.cpp
Expand Up @@ -92,15 +92,16 @@ int DED_ReadLump(ded_t *ded, lumpnum_t lumpNum)
uint8_t const *data = lump.cache();
String sourcePath = lump.container().composePath();
bool custom = (lump.isContained()? lump.container().hasCustom() : lump.hasCustom());
DED_ReadData(ded, (char const *)data, sourcePath, custom);
const int result = DED_ReadData(ded, (char const *)data, sourcePath, custom);
lump.unlock();
return result;
}
return true;
}
catch (LumpIndex::NotFoundError const&)
{} // Ignore error.
DED_SetError("Bad lump number");
return false;
return 0;
}

int DED_Read(ded_t *ded, String path)
Expand Down

0 comments on commit 8a515a3

Please sign in to comment.