From c249e1c4c90b8fd362c5a1dbe9f6beaf66ea8e7b Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Fri, 26 Oct 2007 19:30:59 +0000 Subject: [PATCH] Applied patch by 2points to fix an issue with thesaurus. Originally committed to SVN as r1625. --- aegisub/mythes.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aegisub/mythes.cxx b/aegisub/mythes.cxx index 44de96b38..39c56dab9 100644 --- a/aegisub/mythes.cxx +++ b/aegisub/mythes.cxx @@ -371,6 +371,7 @@ int MyThes::binsearch(char * sw, char* list[], int nlst) lp = 0; up = nlst-1; indx = -1; + if (nlst == 0) return -1; if (strcmp(sw,list[lp]) < 0) return -1; if (strcmp(sw,list[up]) > 0) return -1; while (indx < 0 ) { @@ -394,3 +395,4 @@ char * MyThes::get_th_encoding() return NULL; } +