diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-01-16 08:00:32 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-01-16 08:00:32 +0900 |
| commit | 81e55d98057a4abab1716d1c401a538d0715c7a4 (patch) | |
| tree | 57679b96da5751d04cf0c7b8ec62adc37488d45c /src/codegen.c | |
| parent | 315ecb60cda1b26cc67114e3afb116f6f39ecfab (diff) | |
| download | mruby-81e55d98057a4abab1716d1c401a538d0715c7a4.tar.gz mruby-81e55d98057a4abab1716d1c401a538d0715c7a4.zip | |
wrong condiiton in too many symbols check; #close #731
Diffstat (limited to 'src/codegen.c')
| -rw-r--r-- | src/codegen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c index 6168c7c0e..e728da4ca 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -429,12 +429,12 @@ new_msym(codegen_scope *s, mrb_sym sym) int i, len; len = s->irep->slen; - if (len > 255) len = 255; + if (len > 256) len = 256; for (i=0; i<len; i++) { if (s->irep->syms[i] == sym) return i; if (s->irep->syms[i] == 0) break; } - if (i > 255) { + if (i == 256) { codegen_error(s, "too many symbols (max 256)"); } s->irep->syms[i] = sym; |
