Commit bad1b921 authored by Alexandre Vassalotti's avatar Alexandre Vassalotti

Fix bogus assertion.

parent 3cfcab95
......@@ -3845,7 +3845,7 @@ static PyObject *unicode_encode_ucs1(const Py_UNICODE *p,
/* Resize if we allocated to much */
size = str - PyBytes_AS_STRING(res);
if (size < ressize) { /* If this falls res will be NULL */
assert(size > 0);
assert(size >= 0);
if (_PyBytes_Resize(&res, size) < 0)
goto onError;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment