Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix #56 : return invalid result for codepoint 0xFFFFFFFF
  • Loading branch information
K.Kosako committed May 22, 2017
1 parent 42c9a8a commit 166a6c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gperf_unfold_key_conv.py
Expand Up @@ -36,7 +36,7 @@ def parse_line(s):
if r != s: return r
r = re.sub(REG_GET_CODE, 'OnigCodePoint gcode = wordlist[key].code;', s)
if r != s: return r
r = re.sub(REG_CODE_CHECK, 'if (code == gcode)', s)
r = re.sub(REG_CODE_CHECK, 'if (code == gcode && wordlist[key].index >= 0)', s)
if r != s: return r

return s
Expand Down
2 changes: 1 addition & 1 deletion src/unicode_unfold_key.c
Expand Up @@ -2850,7 +2850,7 @@ unicode_unfold_key(OnigCodePoint code)
{
OnigCodePoint gcode = wordlist[key].code;

if (code == gcode)
if (code == gcode && wordlist[key].index >= 0)
return &wordlist[key];
}
}
Expand Down

0 comments on commit 166a6c3

Please sign in to comment.