Started SBI import work (Issue #79 SBI task). Also ensure catch by reference not value.

This commit is contained in:
James Alan Nguyen 2022-03-19 17:13:00 +11:00
parent 689ed3bf65
commit e032580639
3 changed files with 135 additions and 17 deletions

View file

@ -742,7 +742,7 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
initDispatch();
syncReset();
}
} catch (EndOfFileException e) {
} catch (EndOfFileException& e) {
logE("premature end of file!\n");
lastError="incomplete file";
delete[] file;
@ -1228,7 +1228,7 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
initDispatch();
syncReset();
}
} catch (EndOfFileException e) {
} catch (EndOfFileException& e) {
logE("premature end of file!\n");
lastError="incomplete file";
delete[] file;
@ -1593,10 +1593,10 @@ bool DivEngine::loadMod(unsigned char* file, size_t len) {
syncReset();
}
success=true;
} catch (EndOfFileException e) {
} catch (EndOfFileException& e) {
//logE("premature end of file!\n");
lastError="incomplete file";
} catch (InvalidHeaderException e) {
} catch (InvalidHeaderException& e) {
//logE("invalid info header!\n");
lastError="invalid info header!";
}