ddraw: Fix executebuffer branching with non-zero offset.

Fixes a crash in Moto Racer 2.
This commit is contained in:
Alexander Dorofeyev 2008-02-17 17:36:35 -08:00 committed by Alexandre Julliard
parent 1079f37407
commit 4981eda895
1 changed files with 8 additions and 2 deletions

View File

@ -524,12 +524,18 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This,
if ((This->data.dsStatus.dwStatus & ci->dwMask) == ci->dwValue) {
if (!ci->bNegate) {
TRACE(" Branch to %d\n", ci->dwOffset);
instr = (char*)current + ci->dwOffset;
if (ci->dwOffset) {
instr = (char*)current + ci->dwOffset;
break;
}
}
} else {
if (ci->bNegate) {
TRACE(" Branch to %d\n", ci->dwOffset);
instr = (char*)current + ci->dwOffset;
if (ci->dwOffset) {
instr = (char*)current + ci->dwOffset;
break;
}
}
}