TINSEL: Include filename when giving unsupported compression errors

This commit is contained in:
Paul Gilbert 2020-07-11 09:36:52 -07:00
parent 826ad61d86
commit 293881c016
2 changed files with 7 additions and 6 deletions

View file

@ -274,14 +274,14 @@ void LoadFile(MEMHANDLE *pH) {
Common::File f;
char szFilename[sizeof(pH->szName) + 1];
if (pH->filesize & fCompressed) {
error("Compression handling has been removed");
}
// extract and zero terminate the filename
memcpy(szFilename, pH->szName, sizeof(pH->szName));
szFilename[sizeof(pH->szName)] = 0;
if (pH->filesize & fCompressed) {
error("Compression handling has been removed - %s", szFilename);
}
if (f.open(szFilename)) {
// read the data
int bytes;

View file

@ -137,8 +137,9 @@ void ChangeLanguage(LANGUAGE newLang) {
// close the file
f.close();
} else { // the file must be compressed
error("Compression handling has been removed");
} else {
// the file must be compressed
error("Compression handling for text file has been removed");
}
}