Skip to content

Commit 91e159c

Browse files
authored
Update Objects/unicodeobject.c
1 parent eba2f84 commit 91e159c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3842,7 +3842,7 @@ PyUnicode_AsUTF8(PyObject *unicode)
38423842
{
38433843
Py_ssize_t size;
38443844
const char *utf8 = PyUnicode_AsUTF8AndSize(unicode, &size);
3845-
if (utf8 != NULL && strlen(utf8) != size) {
3845+
if (utf8 != NULL && strlen(utf8) != (size_t)size) {
38463846
PyErr_SetString(PyExc_ValueError, "embedded null character");
38473847
return NULL;
38483848
}

0 commit comments

Comments
 (0)