Skip to content

Commit

Permalink
Fix SF bug #694816, remove comparison of unsigned value < 0
Browse files Browse the repository at this point in the history
  • Loading branch information
nnorwitz committed Feb 28, 2003
1 parent c609689 commit e9c571f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/unicodedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static const _PyUnicode_DatabaseRecord*
_getrecord_ex(Py_UCS4 code)
{
int index;
if (code < 0 || code >= 0x110000)
if (code >= 0x110000)
index = 0;
else {
index = index1[(code>>SHIFT)];
Expand Down Expand Up @@ -258,7 +258,7 @@ unicodedata_decomposition(PyObject *self, PyObject *args)
void
get_decomp_record(Py_UCS4 code, int *index, int *prefix, int *count)
{
if (code < 0 || code >= 0x110000) {
if (code >= 0x110000) {
*index = 0;
}
else {
Expand Down

0 comments on commit e9c571f

Please sign in to comment.