Discussion:
[PATCH] dfa: fix logic typo
(too old to reply)
Paul Eggert
2016-11-21 04:18:38 UTC
Permalink
Raw Message
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 <***@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 <***@fb.com>

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
Loading...