diff options
author | Max Horn | 2003-06-19 18:08:39 +0000 |
---|---|---|
committer | Max Horn | 2003-06-19 18:08:39 +0000 |
commit | a3feb4608087ed6ec65edcf116dc0926dab4f014 (patch) | |
tree | ff0e0b35d3c9bfc6daec212f7db7cfa60dff1ec1 /scumm | |
parent | 2421128e8e3f399e96f9ce179604bbe09db043e6 (diff) | |
download | scummvm-rg350-a3feb4608087ed6ec65edcf116dc0926dab4f014.tar.gz scummvm-rg350-a3feb4608087ed6ec65edcf116dc0926dab4f014.tar.bz2 scummvm-rg350-a3feb4608087ed6ec65edcf116dc0926dab4f014.zip |
instead of casting to byte, rather allow offsets > 255
svn-id: r8564
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/object.cpp | 4 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index ae0317ca94..06e660b404 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -926,14 +926,14 @@ const byte *Scumm::getObjOrActorName(int obj) { return NULL; if (_features & GF_SMALL_HEADER) { - byte offset = 0; + int offset = 0; if (_version <= 2) offset = *(objptr + 14); else if (_features & GF_OLD_BUNDLE) offset = *(objptr + 16); else - offset = (byte) READ_LE_UINT16(objptr + 18); + offset = READ_LE_UINT16(objptr + 18); return (objptr + offset); } diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index 025ae5d6ee..65fa28371e 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -1917,12 +1917,12 @@ void Scumm_v5::o5_setObjectName() { } if (_features & GF_SMALL_HEADER) { - byte offset = 0; + int offset = 0; if (_features & GF_OLD_BUNDLE) offset = *(objptr + 16); else - offset = (byte) READ_LE_UINT16(objptr + 18); + offset = READ_LE_UINT16(objptr + 18); size = READ_LE_UINT16(objptr) - offset; name = objptr + offset; |