mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 09:09:09 +00:00
Fix #12917: Write to negative array index for some string patterns.
Don't popped closed pair from the parenthesis stack a second time.
This commit is contained in:
7
src/3rdparty/icu/scriptrun.cpp
vendored
7
src/3rdparty/icu/scriptrun.cpp
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user