Skip to content

Commit 69dbbe0

Browse files
committed
Remove extra sign from hex, bin, oct for Long.MIN_VALUE
1 parent dd17877 commit 69dbbe0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinFunctions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ protected String bigToString(BigInteger x) {
283283
String doL(long x,
284284
@Cached ConditionProfile isMinLong) {
285285
if (isMinLong.profile(x == Long.MIN_VALUE)) {
286-
return buildString(true, bigToString(PInt.longToBigInteger(x)));
286+
return buildString(true, bigToString(PInt.longToBigInteger(x).abs()));
287287
}
288288
return buildString(x < 0, longToString(Math.abs(x)));
289289
}

0 commit comments

Comments
 (0)