]> Savannah Git Hosting - gnulib.git/commitdiff
strncasecmp_l: Fix replacement implementation.
authorBruno Haible <bruno@clisp.org>
Mon, 17 Feb 2025 07:26:28 +0000 (08:26 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 17 Feb 2025 07:26:28 +0000 (08:26 +0100)
* lib/strncasecmp_l.c (strncasecmp_l): Use tolower_l, not tolower.

ChangeLog
lib/strncasecmp_l.c

index 86c6d81190cb861b6e1fd601d2fe0cc07cbae2c8..efa4b773924e2b4a3f61105489ce41463619a665 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-02-17  Bruno Haible  <bruno@clisp.org>
+
+       strncasecmp_l: Fix replacement implementation.
+       * lib/strncasecmp_l.c (strncasecmp_l): Use tolower_l, not tolower.
+
 2025-02-17  Bruno Haible  <bruno@clisp.org>
 
        strcasecmp, strncasecmp: Fix compilation error on MSVC.
index f20cdc71554e2016b4a7956cf354c8d459feae1c..c049015caf148e253d758f2aedb25e2274964bfd 100644 (file)
@@ -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;