Skip to content

Commit

Permalink
Fixed PDC_mbtowc with 4-byte code points
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusikkala committed Jan 6, 2023
1 parent 6925d0f commit ad7cd29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdcurses/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ int PDC_mbtowc(wchar_t *pwc, const char *s, size_t n)
&& IS_CONTINUATION_BYTE( string[3]))
{
key = ((key & 0x07) << 18) | ((string[1] & 0x3f) << 12) |
((string[2] & 0x3f) << 6) | (string[2] & 0x3f);
((string[2] & 0x3f) << 6) | (string[3] & 0x3f);
if( key <= 0x10ffff)
i = 4; /* four-byte sequence : U+10000 to U+10FFFF */
}
Expand Down

0 comments on commit ad7cd29

Please sign in to comment.