aboutsummaryrefslogtreecommitdiff
path: root/script_v1.cpp
diff options
context:
space:
mode:
authorJames Brown2002-05-08 06:57:27 +0000
committerJames Brown2002-05-08 06:57:27 +0000
commitb9be9d1065fd68deecd985b6557d54411eebc71c (patch)
tree2f6756c6153ca7c1e61ea9053b833d5ba4183c3b /script_v1.cpp
parent713152fcef1fcb169c757c735d8504e6c2897270 (diff)
downloadscummvm-rg350-b9be9d1065fd68deecd985b6557d54411eebc71c.tar.gz
scummvm-rg350-b9be9d1065fd68deecd985b6557d54411eebc71c.tar.bz2
scummvm-rg350-b9be9d1065fd68deecd985b6557d54411eebc71c.zip
Fix a mistake in the resource loader.
svn-id: r4239
Diffstat (limited to 'script_v1.cpp')
-rw-r--r--script_v1.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/script_v1.cpp b/script_v1.cpp
index 87ddf658a5..aaf2de02c0 100644
--- a/script_v1.cpp
+++ b/script_v1.cpp
@@ -825,19 +825,17 @@ void Scumm::o5_actorSetClass()
{
int act = getVarOrDirectWord(0x80);
int newClass;
-
+
while ((_opcode = fetchScriptByte()) != 0xFF) {
newClass = getVarOrDirectWord(0x80);
if (newClass == 0) {
_classData[act] = 0;
-
- if( _features & GF_SMALL_HEADER)
+ if((_features & GF_SMALL_HEADER) && act <= NUM_ACTORS)
{
Actor *a;
- a=derefActor(act);
+ a = derefActorSafe(act, "actorSetClass");
a->forceClip=0;
- }
-
+ }
continue;
}