From: wessels <> Date: Fri, 22 Nov 1996 12:05:23 +0000 (+0000) Subject: fix pre/post decrement bug X-Git-Tag: SQUID_3_0_PRE1~5442 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ecf2e051ccea2f533c137920a44921aedd83d39;p=thirdparty%2Fsquid.git fix pre/post decrement bug --- diff --git a/lib/util.c b/lib/util.c index a6abb00bc8..953a13363d 100644 --- a/lib/util.c +++ b/lib/util.c @@ -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'; }