Commit 3d3ebbc9 authored by Carson McDonald's avatar Carson McDonald

Fix arena size check.

parent 12af0401
......@@ -314,7 +314,7 @@ mrb_free_heap(mrb_state *mrb)
static void
gc_protect(mrb_state *mrb, struct RBasic *p)
{
if (mrb->arena_idx > MRB_ARENA_SIZE) {
if (mrb->arena_idx >= MRB_ARENA_SIZE) {
/* arena overflow error */
mrb->arena_idx = MRB_ARENA_SIZE - 4; /* force room in arena */
mrb_raise(mrb, E_RUNTIME_ERROR, "arena overflow error");
......
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