SCI: Store script sizes in 32-bit integers
Since scripts can be larger than 64KB, and getBufSize() returns a 32-bit integer, adapt variables that store script sizes accordingly
This commit is contained in:
parent
2b50824133
commit
065e83e44f
2 changed files with 4 additions and 4 deletions
|
@ -72,7 +72,7 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
|
|||
SegmentObj *mobj = s->_segMan->getSegment(pos.getSegment(), SEG_TYPE_SCRIPT);
|
||||
Script *script_entity = NULL;
|
||||
const byte *scr;
|
||||
uint scr_size;
|
||||
uint32 scr_size;
|
||||
reg_t retval = make_reg(pos.getSegment(), pos.getOffset() + 1);
|
||||
uint16 param_value = 0xffff; // Suppress GCC warning by setting default value, chose value as invalid to getKernelName etc.
|
||||
uint i = 0;
|
||||
|
@ -344,7 +344,7 @@ void SciEngine::scriptDebug() {
|
|||
if (mobj) {
|
||||
Script *scr = (Script *)mobj;
|
||||
const byte *code_buf = scr->getBuf();
|
||||
uint16 code_buf_size = scr->getBufSize();
|
||||
uint32 code_buf_size = scr->getBufSize();
|
||||
int opcode = pc.getOffset() >= code_buf_size ? 0 : code_buf[pc.getOffset()];
|
||||
int op = opcode >> 1;
|
||||
int paramb1 = pc.getOffset() + 1 >= code_buf_size ? 0 : code_buf[pc.getOffset() + 1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue