From 515d5b58e97afee4cfb2a5b286447f2269498ff6 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 17 Feb 2025 08:26:28 +0100 Subject: [PATCH] strncasecmp_l: Fix replacement implementation. * lib/strncasecmp_l.c (strncasecmp_l): Use tolower_l, not tolower. --- ChangeLog | 5 +++++ lib/strncasecmp_l.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86c6d81190..efa4b77392 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2025-02-17 Bruno Haible + + strncasecmp_l: Fix replacement implementation. + * lib/strncasecmp_l.c (strncasecmp_l): Use tolower_l, not tolower. + 2025-02-17 Bruno Haible strcasecmp, strncasecmp: Fix compilation error on MSVC. diff --git a/lib/strncasecmp_l.c b/lib/strncasecmp_l.c index f20cdc7155..c049015caf 100644 --- a/lib/strncasecmp_l.c +++ b/lib/strncasecmp_l.c @@ -61,8 +61,8 @@ strncasecmp_l (const char *s1, const char *s2, size_t n, locale_t locale) do { - c1 = tolower ((unsigned char) *s1); - c2 = tolower ((unsigned char) *s2); + c1 = tolower_l ((unsigned char) *s1, locale); + c2 = tolower_l ((unsigned char) *s2, locale); if (--n == 0 || c1 == '\0') break; -- 2.39.5