summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 670fca4..48821bd 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -368,7 +368,7 @@ PyObject *PyUnicode_FromWideChar(register const wchar_t *w,
register Py_UNICODE *u;
register int i;
u = PyUnicode_AS_UNICODE(unicode);
- for (i = size; i >= 0; i--)
+ for (i = size; i > 0; i--)
*u++ = *w++;
}
#endif
@@ -393,7 +393,7 @@ int PyUnicode_AsWideChar(PyUnicodeObject *unicode,
register Py_UNICODE *u;
register int i;
u = PyUnicode_AS_UNICODE(unicode);
- for (i = size; i >= 0; i--)
+ for (i = size; i > 0; i--)
*w++ = *u++;
}
#endif