* src/dfa.c (in_coll_range): Fix ordering for second strcoll.  Reported
by Dmitry V. Levin.
* tests/spencer1-locale.awk: Also test single-byte character sets.
* THANKS: Add Dmitry.
---
        Rather than adding a specific testcase, I added more locales
        to the spencer1-locale test.

 THANKS                    |    1 +
 src/dfa.c                 |    2 +-
 tests/spencer1-locale.awk |    2 ++
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/THANKS b/THANKS
index 64f24f1..db792e6 100644
--- a/THANKS
+++ b/THANKS
@@ -21,6 +21,7 @@ Dagobert Michelsen         <[email protected]>
 David Clissold             <[email protected]>
 David J MacKenzie          <[email protected]>
 David O'Brien              <[email protected]>
+Dmitry V. Levin            <[email protected]>
 Eli Zaretskii              <[email protected]>
 Eric Blake                 <[email protected]>
 Florian La Roche           <[email protected]>
diff --git a/src/dfa.c b/src/dfa.c
index e2e45fd..7905bfb 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -397,7 +397,7 @@ static int
 in_coll_range (char ch, char from, char to)
 {
   char c[6] = { from, 0, ch, 0, to, 0 };
-  return strcoll (&c[0], &c[2]) <= 0 && 0 <= strcoll (&c[2], &c[4]);
+  return strcoll (&c[0], &c[2]) <= 0 && strcoll (&c[2], &c[4]) <= 0;
 }
 
 static int is_alpha(int c) { return ISALPHA(c); }
diff --git a/tests/spencer1-locale.awk b/tests/spencer1-locale.awk
index b22de30..ff89342 100644
--- a/tests/spencer1-locale.awk
+++ b/tests/spencer1-locale.awk
@@ -12,6 +12,8 @@ BEGIN {
 
 $0 !~ /^#/  && NF == 3 {
         test("en_US.UTF-8")
+        test("ru_RU.KOI8-R")
+        test("fr_FR.ISO-8859-1")
         test("zh_CN")
        if (extra_locale != "") {
                test(extra_locale)
-- 
1.6.6.1



Reply via email to