[Python-checkins] r67941 - python/branches/py3k/Objects/unicodeobject.c

alexandre.vassalotti python-checkins at python.org
Sat Dec 27 10:49:09 CET 2008


Author: alexandre.vassalotti
Date: Sat Dec 27 10:49:09 2008
New Revision: 67941

Log:
Fix bogus assertion.


Modified:
   python/branches/py3k/Objects/unicodeobject.c

Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c	(original)
+++ python/branches/py3k/Objects/unicodeobject.c	Sat Dec 27 10:49:09 2008
@@ -3845,7 +3845,7 @@
     /* 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;
     }


More information about the Python-checkins mailing list