Skip to content

Commit bb8998a

Browse files
committed
Fix parser bug on Windows with UTF8 encoding and C locale, the reason was
sizeof(wchar_t) = 2 instead of 4.
1 parent c68a631 commit bb8998a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/tsearch2/wordparser/parser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/contrib/tsearch2/wordparser/parser.c,v 1.12 2007/01/15 15:16:28 teodor Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/tsearch2/wordparser/parser.c,v 1.13 2007/03/22 15:58:24 teodor Exp $ */
22

33
#include "postgres.h"
44

@@ -117,7 +117,7 @@ p_isalnum(TParser *prs)
117117
{
118118
if (lc_ctype_is_c())
119119
{
120-
unsigned int c = *(unsigned int*)(prs->wstr + prs->state->poschar);
120+
unsigned int c = *(prs->wstr + prs->state->poschar);
121121

122122
/*
123123
* any non-ascii symbol with multibyte encoding

0 commit comments

Comments
 (0)