]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Correct decrement maxlen.
authorUlrich Drepper <drepper@redhat.com>
Mon, 16 Aug 1999 06:54:42 +0000 (06:54 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 16 Aug 1999 06:54:42 +0000 (06:54 +0000)
wcsmbs/wcsnlen.c

index 5264a66d053a3baab980ee3a2d097afa31d39c38..0696f40495c1b9aeb753cf072cb280b0280e22b5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -37,6 +37,7 @@ __wcsnlen (s, maxlen)
       if (s[++len] == L'\0' || --maxlen == 0)
        return len;
       ++len;
+      --maxlen;
     }
 
   return len;