summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/mruby/value.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mruby/value.h b/include/mruby/value.h
index 22a826385..5a4ef5e2b 100644
--- a/include/mruby/value.h
+++ b/include/mruby/value.h
@@ -427,7 +427,7 @@ mrb_ro_data_p(const char *p)
static inline mrb_bool
mrb_ro_data_p(const char *p)
{
- return (char*)get_edata() < p && p < (char*)get_end();
+ return (char*)get_etext() < p && p < (char*)get_edata();
}
#else
# define mrb_ro_data_p(p) FALSE