diff --git a/src/psl2c.c b/src/psl2c.c index a31a2cd..e634a97 100644 --- a/src/psl2c.c +++ b/src/psl2c.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #ifdef HAVE_ALLOCA_H # include @@ -92,7 +91,7 @@ static void _print_psl_entries(FILE *fpout, const _psl_vector_t *v, const char * #if !defined(WITH_LIBICU) && !defined(WITH_IDN2) static int _str_needs_encoding(const char *s) { - while (*s > 0) s++; + while (*s && *((unsigned char *)s) < 128) s++; return !!*s; }