Skip to content

Commit c9742fe

Browse files
committed
fix chr() range check
1 parent 0f9d8ab commit c9742fe

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
@@ -449,7 +449,7 @@ public abstract static class ChrNode extends PythonBuiltinNode {
449449
@TruffleBoundary
450450
@Specialization
451451
public String charFromInt(int arg) {
452-
if (arg >= 0 && arg < 1114111) {
452+
if (arg >= 0 && arg <= 1114111) {
453453
return Character.toString((char) arg);
454454
} else {
455455
throw raise(ValueError, "chr() arg not in range(0x110000)");

0 commit comments

Comments
 (0)