From: ceriel Date: Wed, 24 Apr 1991 12:18:03 +0000 (+0000) Subject: Fixed bug in checking of last char of environment variable X-Git-Tag: release-5-5~1126 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e00154160824002e53430b6378f3916fc12b89ba;p=ack.git Fixed bug in checking of last char of environment variable --- diff --git a/lang/cem/libcc.ansi/stdlib/getenv.c b/lang/cem/libcc.ansi/stdlib/getenv.c index ae9f0f6f7..15c493d80 100644 --- a/lang/cem/libcc.ansi/stdlib/getenv.c +++ b/lang/cem/libcc.ansi/stdlib/getenv.c @@ -18,8 +18,8 @@ getenv(const char *name) return (char *)NULL; while ((p = *v++) != NULL) { q = name; - while (*q && (*q++ == *p++)) - /* EMPTY */ ; + while (*q && (*q == *p++)) + q++; if (*q || (*p != '=')) continue; return (char *)p + 1;