1
0
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:
Rémy Oudompheng 2013-03-24 11:38:57 +01:00
parent 0a517e458c
commit a909e4ba1e

View File

@ -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;