Commit ccc22d7b authored by take_cheeze's avatar take_cheeze

move debug record size assertion to correct position

parent 9b4b2e7c
...@@ -547,8 +547,6 @@ write_debug_record_1(mrb_state *mrb, mrb_irep *irep, uint8_t *bin, mrb_sym const ...@@ -547,8 +547,6 @@ write_debug_record_1(mrb_state *mrb, mrb_irep *irep, uint8_t *bin, mrb_sym const
ret = cur - bin; ret = cur - bin;
uint32_to_bin(ret, bin); uint32_to_bin(ret, bin);
mrb_assert((cur - bin) == (int)get_debug_record_size(mrb, irep));
return ret; return ret;
} }
...@@ -565,6 +563,8 @@ write_debug_record(mrb_state *mrb, mrb_irep *irep, uint8_t *bin, mrb_sym const* ...@@ -565,6 +563,8 @@ write_debug_record(mrb_state *mrb, mrb_irep *irep, uint8_t *bin, mrb_sym const*
bin += len; bin += len;
size += len; size += len;
} }
mrb_assert(size == (int)get_debug_record_size(mrb, irep));
return size; return size;
} }
......
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