mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-27 19:30:41 +00:00
GOB: Calculate _totResStart even if no resources follow
It's also used as a base offset for TOT strings. This fixes a crash in the Amiga version of Bargon Attack.
This commit is contained in:
parent
0f9b1364cf
commit
dba4084c8a
@ -209,6 +209,7 @@ void Resources::unload(bool del) {
|
||||
_totResourceTable = 0;
|
||||
_extResourceTable = 0;
|
||||
_totTextTable = 0;
|
||||
_totResStart = 0;
|
||||
_totData = 0;
|
||||
_totSize = 0;
|
||||
_imData = 0;
|
||||
@ -233,6 +234,8 @@ bool Resources::loadTOTResourceTable() {
|
||||
if (!stream)
|
||||
return false;
|
||||
|
||||
_totResStart = totProps.scriptEnd;
|
||||
|
||||
if ((totProps.resourcesOffset == 0xFFFFFFFF) ||
|
||||
(totProps.resourcesOffset == 0))
|
||||
// No resources here
|
||||
@ -271,7 +274,6 @@ bool Resources::loadTOTResourceTable() {
|
||||
item.type = kResourceTOT;
|
||||
}
|
||||
|
||||
_totResStart = totProps.scriptEnd;
|
||||
_totSize = stream->size() - _totResStart;
|
||||
|
||||
if (_totSize <= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user