mirror of https://github.com/OpenTTD/OpenTTD
Fix #12917: Write to negative array index for some string patterns.
Don't popped closed pair from the parenthesis stack a second time.pull/12944/head
parent
33a7e9e512
commit
a241ef8da0
|
@ -184,13 +184,6 @@ UBool ScriptRun::next()
|
|||
parenStack[++startSP].scriptCode = scriptCode;
|
||||
}
|
||||
}
|
||||
|
||||
// if this character is a close paired character,
|
||||
// pop it from the stack
|
||||
if (pairIndex >= 0 && (pairIndex & 1) != 0 && parenSP >= 0) {
|
||||
parenSP -= 1;
|
||||
startSP -= 1;
|
||||
}
|
||||
} else {
|
||||
// if the run broke on a surrogate pair,
|
||||
// end it before the high surrogate
|
||||
|
|
Loading…
Reference in New Issue