Skip to content

Commit 8487b46

Browse files
committed
Revert "fix size bug"
This reverts commit 15b6811.
1 parent 8048ae1 commit 8487b46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/exceptions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,7 @@ PyUnicodeEncodeError_GetStart(PyObject *exc, Py_ssize_t *start)
27512751
if (*start<0)
27522752
*start = 0; /*XXX check for values <0*/
27532753
if (*start>=size)
2754-
*start = size ? size-1 : 0;
2754+
*start = size-1;
27552755
Py_DECREF(obj);
27562756
return 0;
27572757
}
@@ -2769,7 +2769,7 @@ PyUnicodeDecodeError_GetStart(PyObject *exc, Py_ssize_t *start)
27692769
if (*start<0)
27702770
*start = 0;
27712771
if (*start>=size)
2772-
*start = size ? size-1 : 0;
2772+
*start = size-1;
27732773
Py_DECREF(obj);
27742774
return 0;
27752775
}

0 commit comments

Comments
 (0)