From 7b7bffd5a82200338d4bef2d5891c7c2485a0f9a Mon Sep 17 00:00:00 2001 From: kurodash Date: Fri, 12 Apr 2013 16:32:07 +0900 Subject: Fixed irep index overflows, when defining new closure. Issue #1137. In the present implementation, when calling mrb_load_string continuously, irep is not released. Therefore, a 16-bit index was overflowing. --- include/mruby/irep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mruby/irep.h b/include/mruby/irep.h index 0305b9e0b..856b12099 100644 --- a/include/mruby/irep.h +++ b/include/mruby/irep.h @@ -12,7 +12,7 @@ extern "C" { #endif typedef struct mrb_irep { - uint16_t idx; + uint32_t idx; uint16_t nlocals; uint16_t nregs; uint8_t flags; -- cgit v1.2.3