]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix assertion in unicode_adjust_maxchar()
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 6 Oct 2011 11:27:56 +0000 (13:27 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 6 Oct 2011 11:27:56 +0000 (13:27 +0200)
Objects/unicodeobject.c

index 72007d9b3226c454a25f4819655f29de37543f13..4e4e53cfd483082f43d2f47ec089c26a5f293ab5 100644 (file)
@@ -1791,7 +1791,7 @@ unicode_adjust_maxchar(PyObject **p_unicode)
             }
         }
     }
-    assert(max_char > PyUnicode_MAX_CHAR_VALUE(unicode));
+    assert(max_char < PyUnicode_MAX_CHAR_VALUE(unicode));
     copy = PyUnicode_New(len, max_char);
     copy_characters(copy, 0, unicode, 0, len);
     Py_DECREF(unicode);