diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-03-11 16:55:18 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-03-11 16:55:18 +0000 |
commit | aaf52da64945f573d375bf892cd66413c11165ec (patch) | |
tree | f27036b885a99998d07646422b1c2e1179f61389 | |
parent | 07ee72fc67d7ffae94e528adb73d9b73ebc4cb4e (diff) |
Pleas apply it for 7.2.1 and current CVS.
Patch fixes using lc.lang instead of lc.lc_ctype.
Teodor Sigaev
-rw-r--r-- | contrib/tsearch/morph.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/tsearch/morph.c b/contrib/tsearch/morph.c index 9eaefabfafc..60797b07e92 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 |