Skip to content

Commit c5d4295

Browse files
committed
[chr] Ensure stop index is correct
1 parent 914b6a1 commit c5d4295

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xpp/modules/ops/stdlib/strman.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def chr_(ctx) -> None:
2727
if (index > vl) or ((stop is not None) and (stop > vl)):
2828
raise InvalidArgument("chr: index or stop is larger then string size!")
2929

30-
res = val[index] if stop is None else val[:stop][index:]
30+
res = val[index] if stop is None else val[:(stop + 1)][(index):]
3131
if aout:
3232
aout[0].set(res)
3333

0 commit comments

Comments
 (0)