Commit 45b8562d authored by Jose Narvaez's avatar Jose Narvaez

Using 'mrb_assert' instead of an returning 0 while checking s->irep in codegen.c.

parent e457b4d6
...@@ -475,9 +475,9 @@ new_msym(codegen_scope *s, mrb_sym sym) ...@@ -475,9 +475,9 @@ new_msym(codegen_scope *s, mrb_sym sym)
{ {
size_t i, len; size_t i, len;
if (s->irep == NULL) return 0; mrb_assert(s->irep);
len = s->irep->slen;
len = s->irep->slen;
if (len > 256) len = 256; if (len > 256) len = 256;
for (i=0; i<len; i++) { for (i=0; i<len; i++) {
if (s->irep->syms[i] == sym) return i; if (s->irep->syms[i] == sym) return i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment