Follow JMPR op only if outside of FDEF and IF

This commit is contained in:
Ben Browitt 2014-03-13 03:19:04 +02:00
parent c3ed71c9c5
commit 8b6aeee35c

View File

@ -3675,10 +3675,12 @@ var Font = (function FontClosure() {
} }
--ifLevel; --ifLevel;
} else if (op === 0x1C) { // JMPR } else if (op === 0x1C) { // JMPR
if (!inFDEF && !inELSE) {
var offset = stack[stack.length - 1]; var offset = stack[stack.length - 1];
// only jumping forward to prevent infinite loop // only jumping forward to prevent infinite loop
if (offset > 0) { i += offset - 1; } if (offset > 0) { i += offset - 1; }
} }
}
// Adjusting stack not extactly, but just enough to get function id // Adjusting stack not extactly, but just enough to get function id
if (!inFDEF && !inELSE) { if (!inFDEF && !inELSE) {
var stackDelta = op <= 0x8E ? TTOpsStackDeltas[op] : var stackDelta = op <= 0x8E ? TTOpsStackDeltas[op] :