Bug 58 - Really only the first locale from the ok_locales list checked
Summary: Really only the first locale from the ok_locales list checked
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 2.0
Hardware: PC FreeBSD
: P2 major
Target Milestone: ---
Assignee: Craig Hughes
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-26 02:12 UTC by Andrey A. Chernov
Modified: 2002-02-25 18:07 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey A. Chernov 2002-02-26 02:12:42 UTC
It is because check loop terminated immediatly after first failure. Please use 
this patch ro fix it:

--- lib/Mail/SpamAssassin/Locales.pm.bak        Tue Jan 22 04:27:46 2002
+++ lib/Mail/SpamAssassin/Locales.pm    Tue Feb 26 12:58:16 2002
@@ -62,7 +62,7 @@
     $locale =~ s/^([a-z][a-z]).*$/$1/; # zh_TW... => zh

     my $ok_for_loc = $charsets_for_locale{$locale};
-    return 0 if (!defined $ok_for_loc);
+    next if (!defined $ok_for_loc);

     if ($ok_for_loc =~ /(?:^| )\Q${cs}\E(?:$| )/) {
       return 1;
Comment 1 Craig Hughes 2002-02-26 03:07:59 UTC
Thanks -- just in time for the 2.1 release!