summaryrefslogtreecommitdiff
path: root/lib/mbsnlen.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-10-20 15:21:43 +0200
committerJörg Frings-Fürst <debian@jff.email>2024-10-20 15:21:43 +0200
commit4682deeb62247d34de87f8e777f99e2d337fd377 (patch)
tree5bd5b5605b5f3a4b3c8ea7468c34c23094afdef4 /lib/mbsnlen.c
parent00893e79fc62966067af1a106567db96bd170338 (diff)
New upstream version 1.3upstream/1.3upstream
Diffstat (limited to 'lib/mbsnlen.c')
-rw-r--r--lib/mbsnlen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mbsnlen.c b/lib/mbsnlen.c
index baadf163..1ce79bfb 100644
--- a/lib/mbsnlen.c
+++ b/lib/mbsnlen.c
@@ -40,7 +40,7 @@ mbsnlen (const char *string, size_t len)
const char *string_end = string + len;
#if GNULIB_MCEL_PREFER
- for (; *string; string += mcel_scan (string, string_end).len)
+ for (; string < string_end; string += mcel_scan (string, string_end).len)
count++;
#else
mbif_state_t state;