scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 9ac16f7a1c84641109ea15c4a7c7dca8c489bff9
parent 2fcf0e895e2bd5f1676f492af4b1ad4a772a2171
Author: Quentin Rameau <quinq@fifth.space>
Date:   Mon,  7 Oct 2019 22:29:22 +0200

[cc] Initialize counter to 0 in path()

Diffstat:
Msrc/cmd/cc/posix/cc.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cmd/cc/posix/cc.c b/src/cmd/cc/posix/cc.c @@ -82,7 +82,7 @@ path(char *s) char *arg, buff[FILENAME_MAX]; size_t len, cnt; - for ( ; *s && cnt < FILENAME_MAX; ++s) { + for (cnt = 0 ; *s && cnt < FILENAME_MAX; ++s) { if (*s != '%') { buff[cnt++] = *s; continue;