mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix bogus assertion.
This commit is contained in:
parent
3cfcab9592
commit
bad1b9219b
1 changed files with 1 additions and 1 deletions
|
@ -3845,7 +3845,7 @@ static PyObject *unicode_encode_ucs1(const Py_UNICODE *p,
|
||||||
/* Resize if we allocated to much */
|
/* Resize if we allocated to much */
|
||||||
size = str - PyBytes_AS_STRING(res);
|
size = str - PyBytes_AS_STRING(res);
|
||||||
if (size < ressize) { /* If this falls res will be NULL */
|
if (size < ressize) { /* If this falls res will be NULL */
|
||||||
assert(size > 0);
|
assert(size >= 0);
|
||||||
if (_PyBytes_Resize(&res, size) < 0)
|
if (_PyBytes_Resize(&res, size) < 0)
|
||||||
goto onError;
|
goto onError;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue