findchar:
// <0xC2 is always an overlong encoding, they're invalid, thus skipped
- while (i < _maxlen && s[i] && s[i] >= 0x80 && s[i] <= 0xC2) {
+ while (i < _maxlen && s[i] && s[i] >= 0x80 && s[i] < 0xC2) {
//fprintf(stderr, "skipping\n");
++i;
}
}
// invalid, skip u8_analyze
- if (*s <= 0xC2)
+ if (*s < 0xC2)
{
++s;
continue;
}
// invalid, skip u8_analyze
- if (*s <= 0xC2)
+ if (*s < 0xC2)
{
++s;
--n;
}
// invalid, skip u8_analyze
- if (*s <= 0xC2)
+ if (*s < 0xC2)
{
++s;
++len;
}
// invalid, skip u8_analyze
- if (s[ofs] <= 0xC2)
+ if (s[ofs] < 0xC2)
{
++ofs;
continue;
}
// invalid, skip u8_analyze
- if (s[ofs] <= 0xC2)
+ if (s[ofs] < 0xC2)
{
++ofs;
continue;