Fix parser bug on Windows with UTF8 encoding and C locale, the reason was
authorTeodor Sigaev <[email protected]>
Thu, 22 Mar 2007 15:59:09 +0000 (15:59 +0000)
committerTeodor Sigaev <[email protected]>
Thu, 22 Mar 2007 15:59:09 +0000 (15:59 +0000)
sizeof(wchar_t) = 2 instead of 4.

contrib/tsearch2/wordparser/parser.c

index 77c33367ce67fde81aa62768470a7fae610b5782..bbc2cd5a1e6631e45d1e089c1497c0b0613c7a11 100644 (file)
@@ -117,7 +117,7 @@ p_isalnum(TParser *prs)
        {
                if (lc_ctype_is_c())
                {
-                       unsigned int c = *(unsigned int*)(prs->wstr + prs->state->poschar);
+                       unsigned int c = *(prs->wstr + prs->state->poschar);
 
                        /*
                         * any non-ascii symbol with multibyte encoding