From bad1b9219b8507962c32dcbe49efef1250056739 Mon Sep 17 00:00:00 2001 From: Alexandre Vassalotti Date: Sat, 27 Dec 2008 09:49:09 +0000 Subject: [PATCH] Fix bogus assertion. --- Objects/unicodeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index fa74631225..1b6a4538a9 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; } -- 2.40.0