Commit 4981eda8 authored by Alexander Dorofeyev's avatar Alexander Dorofeyev Committed by Alexandre Julliard

ddraw: Fix executebuffer branching with non-zero offset.

Fixes a crash in Moto Racer 2.
parent 1079f374
......@@ -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;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment