mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-04 15:49:42 +02:00
(keycompare): Ignore any length difference if the
localized comparison says the strings are equal.
This commit is contained in:
+9
-2
@@ -1324,10 +1324,17 @@ keycompare (const struct line *a, const struct line *b)
|
||||
{
|
||||
#ifdef ENABLE_NLS
|
||||
if (need_locale)
|
||||
diff = memcoll (texta, lena, textb, lenb);
|
||||
{
|
||||
/* Ignore any length difference if the localized comparison
|
||||
says the strings are equal. */
|
||||
comparable_lengths = 0;
|
||||
diff = memcoll (texta, lena, textb, lenb);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
diff = memcmp (texta, textb, min (lena, lenb));
|
||||
{
|
||||
diff = memcmp (texta, textb, min (lena, lenb));
|
||||
}
|
||||
}
|
||||
|
||||
if (diff)
|
||||
|
||||
Reference in New Issue
Block a user