Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5474d0b

Browse files
committed
Issue #20284: Fix a compilation warning on Windows
Explicitly cast the long to char.
1 parent 29dacf2 commit 5474d0b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/bytesobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ formatchar(char *buf, size_t buflen, PyObject *v)
529529
"%c requires an integer in range(256) or a single byte");
530530
goto error;
531531
}
532-
buf[0] = ival;
532+
buf[0] = (char)ival;
533533
}
534534
Py_XDECREF(w);
535535
buf[1] = '\0';

0 commit comments

Comments
 (0)