changeset 38199:632bf6c3a968

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.
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 20 Nov 2016 20:16:29 -0800
parents 02ff047b612b
children e6f5abf51e32
files ChangeLog lib/dfa.c
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Nov 20 08:33:38 2016 -0800
+++ b/ChangeLog	Sun Nov 20 20:16:29 2016 -0800
@@ -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
--- a/lib/dfa.c	Sun Nov 20 08:33:38 2016 -0800
+++ b/lib/dfa.c	Sun Nov 20 20:16:29 2016 -0800
@@ -815,8 +815,8 @@
      && '}' == 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