We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eba2f84 commit 91e159cCopy full SHA for 91e159c
Objects/unicodeobject.c
@@ -3842,7 +3842,7 @@ PyUnicode_AsUTF8(PyObject *unicode)
3842
{
3843
Py_ssize_t size;
3844
const char *utf8 = PyUnicode_AsUTF8AndSize(unicode, &size);
3845
- if (utf8 != NULL && strlen(utf8) != size) {
+ if (utf8 != NULL && strlen(utf8) != (size_t)size) {
3846
PyErr_SetString(PyExc_ValueError, "embedded null character");
3847
return NULL;
3848
}
0 commit comments