diff options
Diffstat (limited to 'contrib/tsearch2/ispell/regis.c')
-rw-r--r-- | contrib/tsearch2/ispell/regis.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/contrib/tsearch2/ispell/regis.c b/contrib/tsearch2/ispell/regis.c index db6f1873f33..20b6bddecf6 100644 --- a/contrib/tsearch2/ispell/regis.c +++ b/contrib/tsearch2/ispell/regis.c @@ -9,14 +9,16 @@ bool RS_isRegis(const char *str) { - unsigned char *ptr = (unsigned char *) str; - - while (ptr && *ptr) - if (t_isalpha(ptr) || t_iseq(ptr,'[') || t_iseq(ptr,']') || t_iseq(ptr, '^')) - ptr+=pg_mblen(ptr); + while (str && *str) + { + if (t_isalpha(str) || + t_iseq(str, '[') || + t_iseq(str,']') || + t_iseq(str, '^')) + str += pg_mblen(str); else return false; - + } return true; } |