Commit a909e4ba authored by Rémy Oudompheng's avatar Rémy Oudompheng

cmd/cc: fix typo leading to index out of range.

Detected by GCC static analysis.

Fixes #5117.

R=golang-dev, ality, minux.ma
CC=golang-dev
https://golang.org/cl/7665047
parent 0a517e45
......@@ -269,7 +269,7 @@ dclfunct(Type *t, Sym *s)
goto bad;
f = alloc(sizeof(*f));
for(o=0; o<sizeof(f->sym); o++)
for(o=0; o<nelem(f->sym); o++)
f->sym[o] = S;
t->funct = f;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment