1
0
Fork 0

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
Peter Nelson 2024-09-06 12:08:19 +01:00 committed by Peter Nelson
parent 33a7e9e512
commit a241ef8da0
1 changed files with 0 additions and 7 deletions

View File

@ -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