scc

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

commit 3a75da24c4116c88a6dfd3d53b03de75c91e9ede
parent ca137e7b328a2a441075de9b9b178086464bbbce
Author: Quentin Rameau <quinq@fifth.space>
Date:   Fri,  2 Oct 2020 15:41:35 +0200

libmac: Fix iteration limit over mapsec array

Diffstat:
Msrc/libmach/findsec.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libmach/findsec.c b/src/libmach/findsec.c @@ -10,7 +10,7 @@ findsec(Map *map, char *name) int i; struct mapsec *sec; - for (i = 0; i < map->sec; i++) { + for (i = 0; i < map->n; i++) { char *s = map->sec[i].name; if (s && strcmp(s, name) == 0) return i;