1
0
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:
Jim Meyering
1999-05-20 16:29:38 +00:00
parent 9a27ea2eb2
commit d30365509d
+9 -2
View File
@@ -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)