sf#247 comparison between signed and unsigned

This commit is contained in:
Caolán McNamara 2014-10-17 12:22:19 +00:00
parent d4cd34b4da
commit 25e74becb5
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ void hnj_hyphen_load_line(char * buf, HyphenDict * dict, HashTab * hashtab) {
if (dict->utf8) { if (dict->utf8) {
int pu = -1; /* unicode character position */ int pu = -1; /* unicode character position */
int ps = -1; /* unicode start position (original replindex) */ int ps = -1; /* unicode start position (original replindex) */
int pc = (*word == '.') ? 1: 0; /* 8-bit character position */ size_t pc = (*word == '.') ? 1: 0; /* 8-bit character position */
for (; pc < (strlen(word) + 1); pc++) { for (; pc < (strlen(word) + 1); pc++) {
/* beginning of an UTF-8 character (not '10' start bits) */ /* beginning of an UTF-8 character (not '10' start bits) */
if ((((unsigned char) word[pc]) >> 6) != 2) pu++; if ((((unsigned char) word[pc]) >> 6) != 2) pu++;