From: Victor Stinner Date: Tue, 11 Oct 2011 21:27:52 +0000 (+0200) Subject: Fix compiler warning in _PyUnicode_FromUCS2() X-Git-Tag: v3.3.0a1~1212 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e10100dee015f9132122108eaf69fc1bc8369bf;p=python Fix compiler warning in _PyUnicode_FromUCS2() --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index b2b492a9ec..1042254435 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1717,7 +1717,7 @@ _PyUnicode_FromUCS2(const Py_UCS2 *u, Py_ssize_t size) assert(size >= 0); if (size == 1 && u[0] < 256) - return get_latin1_char(u[0]); + return get_latin1_char((unsigned char)u[0]); for (i = 0; i < size; i++) { if (u[i] > max_char) { max_char = u[i];