summaryrefslogtreecommitdiff
path: root/lingucomponent/source
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2005-12-14 08:42:54 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2005-12-14 08:42:54 +0000
commit55b57c9a0fef3686191102d9ee7357523fd98e2e (patch)
tree5b3a6c50b5eca4787a277cad2a5850a684ea138f /lingucomponent/source
parentae00b70b9988d22f00ea0548f4581503c7ac13e9 (diff)
INTEGRATION: CWS cmcfixes20 (1.3.42); FILE MERGED
2005/10/28 08:04:19 cmc 1.3.42.1: #i55603# make mythes safe against empty thesasurus
Diffstat (limited to 'lingucomponent/source')
-rw-r--r--lingucomponent/source/thesaurus/mythes/mythes.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/lingucomponent/source/thesaurus/mythes/mythes.cxx b/lingucomponent/source/thesaurus/mythes/mythes.cxx
index e26b6af38b61..5e1ca71309c0 100644
--- a/lingucomponent/source/thesaurus/mythes/mythes.cxx
+++ b/lingucomponent/source/thesaurus/mythes/mythes.cxx
@@ -147,7 +147,7 @@ int MyThes::Lookup(const char * pText, int len, mentry** pme)
memcpy(wrd,pText,len);
/* find it in the list */
- int idx = binsearch(wrd,list,nw);
+ int idx = nw > 0 ? binsearch(wrd,list,nw) : -1;
free(wrd);
if (idx < 0) return 0;