From: Bruce Momjian Date: Mon, 11 Mar 2002 16:54:27 +0000 (+0000) Subject: Pleas apply it for 7.2.1 and current CVS. X-Git-Tag: REL7_3~1902 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cdfe4bb64f5bb2fdc091c860d69754203f7c0f42;p=postgresql Pleas apply it for 7.2.1 and current CVS. Patch fixes using lc.lang instead of lc.lc_ctype. Teodor Sigaev --- diff --git a/contrib/tsearch/morph.c b/contrib/tsearch/morph.c index 9eaefabfaf..60797b07e9 100644 --- a/contrib/tsearch/morph.c +++ b/contrib/tsearch/morph.c @@ -114,12 +114,13 @@ initmorph(void) #ifdef USE_LOCALE PGLC_current(&lc); - for (i = 1; i < lengthof(dicts); i++) - if (strcmp(dicts[i].localename, lc.lang) == 0) - { - bylocaledict = i; - break; - } + if ( lc.lc_ctype ) + for (i = 1; i < lengthof(dicts); i++) + if (strcmp(dicts[i].localename, lc.lc_ctype) == 0) + { + bylocaledict = i; + break; + } PGLC_free_categories(&lc); #endif