]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix pre/post decrement bug
authorwessels <>
Fri, 22 Nov 1996 12:05:23 +0000 (12:05 +0000)
committerwessels <>
Fri, 22 Nov 1996 12:05:23 +0000 (12:05 +0000)
lib/util.c

index a6abb00bc8b99ddb331085feaf3333ba4d64d76b..953a13363d13267ee724669874cc65941870f539 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: util.c,v 1.26 1996/11/14 19:04:23 wessels Exp $
+ * $Id: util.c,v 1.27 1996/11/22 05:05:23 wessels Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -475,7 +475,7 @@ xstrncpy(char *dst, const char *src, size_t n)
 {
     if (n != 0) {
        if (src != NULL)
-           while (n-- != 0 && *src != '\0')
+           while (--n != 0 && *src != '\0')
                *dst++ = *src++;
        *dst = '\0';
     }