]> Savannah Git Hosting - gnulib.git/commitdiff
dfa: fix logic typo
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Nov 2016 04:16:29 +0000 (20:16 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 21 Nov 2016 04:16:56 +0000 (20:16 -0800)
Problem reported by Stephane Chazelas (Bug#24973).
* lib/dfa.c (using_simple_locale): Fix typo that caused some
non-simple locales like fr_FR to be treated as simple.

ChangeLog
lib/dfa.c

index 88139c35d099b6f3b9d3b7e4b19f561ed65aa056..fbdecf003d922a435bdabcef296551800e06d61b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-11-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       dfa: fix logic typo
+       Problem reported by Stephane Chazelas (Bug#24973).
+       * lib/dfa.c (using_simple_locale): Fix typo that caused some
+       non-simple locales like fr_FR to be treated as simple.
+
 2016-11-20  Jim Meyering  <meyering@fb.com>
 
        fix test driver leaks: exclude, malloc, realloc
index 744a9f1413099617f6c6c9afafc5f6af45e67bb8..7b80a1a099486dcf4d55e4cdc85d06aff846c8e6 100644 (file)
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -815,8 +815,8 @@ using_simple_locale (bool multibyte)
      && '}' == 125 && '~' == 126)
   };
 
-  if (native_c_charset && !multibyte)
-    return true;
+  if (!native_c_charset || multibyte)
+    return false;
   else
     {
       /* Treat C and POSIX locales as being compatible.  Also, treat