From 60e8ffca02dd4eac3a87b744f4f9ef68f3dffa35 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 20 Nov 2016 20:16:29 -0800 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ lib/dfa.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 88139c35d0..fbdecf003d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2016-11-20 Paul Eggert + + 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 fix test driver leaks: exclude, malloc, realloc diff --git a/lib/dfa.c b/lib/dfa.c index 744a9f1413..7b80a1a099 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.39.5