From bb8998a4755829388bdd151d3fd346f9688357d5 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Thu, 22 Mar 2007 15:58:24 +0000 Subject: [PATCH] Fix parser bug on Windows with UTF8 encoding and C locale, the reason was sizeof(wchar_t) = 2 instead of 4. --- contrib/tsearch2/wordparser/parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/tsearch2/wordparser/parser.c b/contrib/tsearch2/wordparser/parser.c index 3706a0efb7..c7b7459e59 100644 --- a/contrib/tsearch2/wordparser/parser.c +++ b/contrib/tsearch2/wordparser/parser.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/contrib/tsearch2/wordparser/parser.c,v 1.12 2007/01/15 15:16:28 teodor Exp $ */ +/* $PostgreSQL: pgsql/contrib/tsearch2/wordparser/parser.c,v 1.13 2007/03/22 15:58:24 teodor Exp $ */ #include "postgres.h" @@ -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