summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2008-12-27 09:49:09 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2008-12-27 09:49:09 (GMT)
commitbad1b9219b8507962c32dcbe49efef1250056739 (patch)
treee65100855c26776e7d4d1548aa18e786fc341db4 /Objects
parent3cfcab95924b089d4ba3844db05fa2cb913da0ba (diff)
downloadcpython-bad1b9219b8507962c32dcbe49efef1250056739.zip
cpython-bad1b9219b8507962c32dcbe49efef1250056739.tar.gz
cpython-bad1b9219b8507962c32dcbe49efef1250056739.tar.bz2
Fix bogus assertion.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index fa74631..1b6a453 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;
}