From: Martin v. Löwis Date: Sat, 23 Nov 2002 17:11:06 +0000 (+0000) Subject: Fix off-by-one error. X-Git-Tag: v2.3c1~3277 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f4be4e38ab0adc8ee6773e920754e7ea8c51e89;p=thirdparty%2FPython%2Fcpython.git Fix off-by-one error. --- diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 269ba57ec658..330b3763e44c 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -326,7 +326,7 @@ _getucname(Py_UCS4 code, char* buffer, int buflen) int word; unsigned char* w; - if (SBase <= code && code <= SBase+SCount) { + if (SBase <= code && code < SBase+SCount) { /* Hangul syllable. */ int SIndex = code - SBase; int L = SIndex / NCount;