mirror of
https://github.com/golang/go
synced 2024-11-12 06:20:22 -07:00
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
This commit is contained in:
parent
0a517e458c
commit
a909e4ba1e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user