bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] dfa: fix logic typo


From: Paul Eggert
Subject: [PATCH] dfa: fix logic typo
Date: Sun, 20 Nov 2016 20:18:38 -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 | 7 +++++++
 lib/dfa.c | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 88139c3..fbdecf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-11-20  Paul Eggert  <address@hidden>
+
+       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  <address@hidden>
 
        fix test driver leaks: exclude, malloc, realloc
diff --git a/lib/dfa.c b/lib/dfa.c
index 744a9f1..7b80a1a 100644
--- 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
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]