bugfixed possible crash

This commit is contained in:
jkriege2 2022-08-07 20:33:48 +02:00
parent bd1afe2a0a
commit 3d0183f6e9

View File

@ -1374,7 +1374,8 @@ JKQTMathText::tokenType JKQTMathText::getToken() {
while ((currentTokenID<parseString.size()) && (QString("01234567").contains(c))) { while ((currentTokenID<parseString.size()) && (QString("01234567").contains(c))) {
num+=c; num+=c;
currentTokenID++; currentTokenID++;
c=parseString[currentTokenID]; if (currentTokenID<parseString.size()) c=parseString[currentTokenID];
else c=QChar();
} }
if (currentTokenID<parseString.size()) currentTokenID--; if (currentTokenID<parseString.size()) currentTokenID--;
currentTokenName=QString::fromStdString(jkqtp_UnicodeToUTF8(num.toLongLong(nullptr, 8))); currentTokenName=QString::fromStdString(jkqtp_UnicodeToUTF8(num.toLongLong(nullptr, 8)));