avoid negative indicies access to parenStack - thanks @talaj! (ref #4096)

This commit is contained in:
Artem Pavlenko 2019-11-05 09:50:51 +00:00
parent 33fac6d47d
commit 7003255c0e

View file

@ -162,6 +162,7 @@ UBool ScriptRun::next()
if ((pairIndex & 1) == 0) { if ((pairIndex & 1) == 0) {
++parenSP; ++parenSP;
parenStack.emplace_back(pairIndex, scriptCode); parenStack.emplace_back(pairIndex, scriptCode);
startSP = parenSP;
} else if (parenSP >= 0) { } else if (parenSP >= 0) {
int32_t pi = pairIndex & ~1; int32_t pi = pairIndex & ~1;