From: Martin v. Löwis Date: Sun, 18 Sep 2005 08:17:56 +0000 (+0000) Subject: Patch #1213831: Fix typo in unicodedata._getcode. X-Git-Tag: v2.5a0~1365 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b291e2d66390b8511b9e9d861e34714d40d5f5b;p=thirdparty%2FPython%2Fcpython.git Patch #1213831: Fix typo in unicodedata._getcode. Will backport to Python 2.4. --- diff --git a/Misc/NEWS b/Misc/NEWS index fca9b5522005..1ffa307782ae 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -143,6 +143,8 @@ Core and builtins Extension Modules ----------------- +- Patch #1213831: Fix typo in unicodedata._getcode. + - Bug #1007046: os.startfile() did not accept unicode strings encoded in the file system encoding. diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 021bacf7b6a3..be966f096450 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -820,7 +820,7 @@ _getcode(const char* name, int namelen, Py_UCS4* code) pos += len; find_syllable(pos, &len, &T, TCount, 2); pos += len; - if (V != -1 && V != -1 && T != -1 && pos-name == namelen) { + if (L != -1 && V != -1 && T != -1 && pos-name == namelen) { *code = SBase + (L*VCount+V)*TCount + T; return 1; }