]> granicus.if.org Git - python/commitdiff
Oops, fix my previous change on _copy_characters()
authorVictor Stinner <victor.stinner@gmail.com>
Sat, 16 Jun 2012 02:53:00 +0000 (04:53 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Sat, 16 Jun 2012 02:53:00 +0000 (04:53 +0200)
Objects/unicodeobject.c

index ad0e2e3843caeede4f1a670fa46155c3dcc48f86..d5d83fde3c817108ec9504a9a6bf15846baa724c 100644 (file)
@@ -1254,10 +1254,10 @@ _copy_characters(PyObject *to, Py_ssize_t to_start,
             for (i=0; i < how_many; i++) {
                 ch = PyUnicode_READ(from_kind, from_data, from_start + i);
 #ifndef Py_DEBUG
-                assert(ch <= to_maxchar);
-#else
                 if (ch > to_maxchar)
                     return -1;
+#else
+                assert(ch <= to_maxchar);
 #endif
                 PyUnicode_WRITE(to_kind, to_data, to_start + i, ch);
             }