Skip to content

Commit

Permalink
compiler: off-by-one error in forall_syms
Browse files Browse the repository at this point in the history
test/wundef found this, but only sometimes.
  • Loading branch information
wpwrak committed Jan 12, 2012
1 parent a1adbc3 commit 5a386a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/symtab.h
Expand Up @@ -34,7 +34,7 @@ extern int num_user_syms;

#define forall_syms(p) \
for ((p) = well_known; (p) != user_syms+num_user_syms; \
(p) = (p) == well_known+num_well_known ? user_syms : (p)+1)
(p) = (p) == well_known+num_well_known-1 ? user_syms : (p)+1)

void symtab_init(void);
struct sym *unique(const char *s);
Expand Down

0 comments on commit 5a386a3

Please sign in to comment.