diff Objects/unicodeobject.c @ 18051:e897550b4748 legacy-trunk

Fixes [ #430986 ] Buglet in PyUnicode_FromUnicode.
author Marc-André Lemburg <mal@egenix.com>
date Thu, 07 Jun 2001 12:26:56 +0000
parents 837825a779c1
children c29f3135a20c
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Thu Jun 07 05:52:17 2001 +0000
+++ b/Objects/unicodeobject.c	Thu Jun 07 12:26:56 2001 +0000
@@ -297,9 +297,9 @@
 	    unicode = unicode_latin1[*u];
 	    if (!unicode) {
 		unicode = _PyUnicode_New(1);
-		unicode->str[0] = *u;
 		if (!unicode)
 		    return NULL;
+		unicode->str[0] = *u;
 		unicode_latin1[*u] = unicode;
 	    }
 	    Py_INCREF(unicode);