[fix](fe) Inconsistent behavior for string comparison in FE and BE (#13604)
This commit is contained in:
@ -96,9 +96,9 @@ public class StringLiteral extends LiteralExpr {
|
||||
int minLength = Math.min(thisBytes.length, otherBytes.length);
|
||||
int i = 0;
|
||||
for (i = 0; i < minLength; i++) {
|
||||
if (thisBytes[i] < otherBytes[i]) {
|
||||
if (Byte.toUnsignedInt(thisBytes[i]) < Byte.toUnsignedInt(otherBytes[i])) {
|
||||
return -1;
|
||||
} else if (thisBytes[i] > otherBytes[i]) {
|
||||
} else if (Byte.toUnsignedInt(thisBytes[i]) > Byte.toUnsignedInt(otherBytes[i])) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user