Skip to content

Commit

Permalink
Merge pull request #163 from jpd236/encode-puz
Browse files Browse the repository at this point in the history
Fix bug in can_encode_puz.
  • Loading branch information
mrichards42 authored Aug 18, 2021
2 parents e5609e1 + d58a0f3 commit 1960e5d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions puz/puzstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ static char unicode_to_puz(unsigned int cp)

static bool can_encode_puz(unsigned int cp)
{
if (cp > 255)
return false;
else if (cp < 128 || cp >= 160)
if (cp < 128 || (cp >= 160 && cp <= 255))
return true;
else
{
Expand Down

0 comments on commit 1960e5d

Please sign in to comment.