mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 17:02:37 +01: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:
committed by
Peter Nelson
parent
33a7e9e512
commit
a241ef8da0
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