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; Common::File f;
char szFilename[sizeof(pH->szName) + 1]; char szFilename[sizeof(pH->szName) + 1];
if (pH->filesize & fCompressed) {
error("Compression handling has been removed");
}
// extract and zero terminate the filename // extract and zero terminate the filename
memcpy(szFilename, pH->szName, sizeof(pH->szName)); memcpy(szFilename, pH->szName, sizeof(pH->szName));
szFilename[sizeof(pH->szName)] = 0; szFilename[sizeof(pH->szName)] = 0;
if (pH->filesize & fCompressed) {
error("Compression handling has been removed - %s", szFilename);
}
if (f.open(szFilename)) { if (f.open(szFilename)) {
// read the data // read the data
int bytes; int bytes;

View file

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