mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Modify the type of line-number to uint16_t. Type short is not portable. And it cannot be more than UINT16_MAX because of the mrbc binary format.
This commit is contained in:
+1
-1
@@ -2401,7 +2401,7 @@ scope_finish(codegen_scope *s)
|
||||
irep->iseq = (mrb_code *)codegen_realloc(s, s->iseq, sizeof(mrb_code)*s->pc);
|
||||
irep->ilen = s->pc;
|
||||
if (s->lines) {
|
||||
irep->lines = (short *)codegen_realloc(s, s->lines, sizeof(short)*s->pc);
|
||||
irep->lines = (uint16_t *)codegen_realloc(s, s->lines, sizeof(uint16_t)*s->pc);
|
||||
}
|
||||
else {
|
||||
irep->lines = 0;
|
||||
|
||||
Reference in New Issue
Block a user