mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
+1
-1
@@ -199,8 +199,8 @@ mrb_raise(mrb_state *mrb, struct RClass *c, const char *fmt, ...)
|
||||
|
||||
va_start(args, fmt);
|
||||
vsnprintf(buf, 256, fmt, args);
|
||||
mrb_raise_va(mrb, c, fmt, args);
|
||||
va_end(args);
|
||||
mrb_exc_raise(mrb, mrb_exc_new(mrb, c, buf, strlen(buf)));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
+1
-1
@@ -444,7 +444,7 @@ read_rite_irep_record(mrb_state *mrb, unsigned char *src, mrb_irep *irep, uint32
|
||||
irep->slen = bin_to_uint32(src); //syms length
|
||||
src += MRB_DUMP_SIZE_OF_LONG;
|
||||
if (irep->slen > 0) {
|
||||
if ((irep->syms = mrb_malloc(mrb, MRB_DUMP_SIZE_OF_INT * irep->slen)) == NULL) {
|
||||
if ((irep->syms = mrb_malloc(mrb, sizeof(mrb_sym) * irep->slen)) == NULL) {
|
||||
ret = MRB_DUMP_INVALID_IREP;
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user