mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fix compiler warnings: comparison between signed and unsigned numbers
This commit is contained in:
parent
7f04d4d4b7
commit
f50e187724
2 changed files with 2 additions and 2 deletions
|
@ -4799,7 +4799,7 @@ _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size)
|
|||
|
||||
/* Note: size will always be longer than the resulting Unicode
|
||||
character count */
|
||||
if (PY_SSIZE_T_MAX / sizeof(wchar_t) < (size + 1))
|
||||
if (PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(wchar_t) < (size + 1))
|
||||
return NULL;
|
||||
unicode = PyMem_RawMalloc((size + 1) * sizeof(wchar_t));
|
||||
if (!unicode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue