SCI: fix regression of r51060

svn-id: r51062
This commit is contained in:
Martin Kiewitz 2010-07-20 12:50:13 +00:00
parent 0b3f816c8b
commit 6ebcb53265

View File

@ -928,10 +928,17 @@ static void callKernelFunc(EngineState *s, int kernelCallNr, int argc) {
error("[VM] k%s: signature mismatch via method %s::%s (script %d, localCall %x)", kernelSubCall.name, originReply.objectName.c_str(), originReply.methodName.c_str(), originReply.scriptNr, originReply.localCallOffset);
}
// FIXME: implement some real workaround type logic - ignore call, still do call etc.
if (workaround.segment == 2)
s->r_acc = make_reg(0, workaround.offset);
if (workaround.segment)
switch (workaround.segment) {
case 0: // don't do kernel call, leave acc alone
return;
case 1: // call kernel anyway
break;
case 2: // don't do kernel call, fake acc
s->r_acc = make_reg(0, workaround.offset);
return;
default:
error("unknown workaround type");
}
}
if (!kernelSubCall.function)
error("[VM] k%s: subfunction-id %d requested, but not available", kernelCall.name, subId);