fix: char > 127 when test in fix point exponent

This commit is contained in:
Roy Qu 2024-03-27 20:14:39 +08:00
parent 7034742741
commit 37f98eb605
1 changed files with 5 additions and 3 deletions

View File

@ -3598,7 +3598,7 @@ bool ASFormatter::isInExponent() const
return false;
int i = charNum - 1;
char prevChar = currentLine[i];
unsigned char prevChar = currentLine[i];
if (prevChar == 'e' || prevChar == 'E') {
i--;
@ -3613,7 +3613,8 @@ bool ASFormatter::isInExponent() const
} else if (isDigit(prevChar)) {
numCount++;
} else {
if (isLetterOrUnderLine(prevChar) || prevChar == '$')
if (isLetterOrUnderLine(prevChar) || prevChar == '$'
|| prevChar>127)
return false;
break;
}
@ -3647,7 +3648,8 @@ bool ASFormatter::isInExponent() const
return false;
hasX = true;
} else {
if (isLetterOrUnderLine(prevChar) || prevChar == '$')
if (isLetterOrUnderLine(prevChar) || prevChar == '$'
|| prevChar>127)
return false;
break;
}