Skip to content

Commit 95744bd

Browse files
committed
Revert the change that is not necessary
1 parent ad96b89 commit 95744bd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Objects/bytesobject.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,11 +2526,13 @@ _PyBytes_FromHex(PyObject *string, int use_bytearray)
25262526
end = str + hexlen;
25272527
while (str < end) {
25282528
/* skip over spaces in the input */
2529-
while (str < end && Py_ISSPACE(*str)) {
2530-
str++;
2529+
if (Py_ISSPACE(*str)) {
2530+
do {
2531+
str++;
2532+
} while (Py_ISSPACE(*str));
2533+
if (str >= end)
2534+
break;
25312535
}
2532-
if (str >= end)
2533-
break;
25342536

25352537
/* Check first hex digit */
25362538
top = _PyLong_DigitValue[*str];

0 commit comments

Comments
 (0)