summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-16 11:58:33 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-16 11:58:33 +0000
commit16aedfe0a04432e9912dd4c8c662c5e416c67af9 (patch)
treee4eb1cc3ae7663a3420cdf599992791b0016454b /vm.c
parentb38334e2ec11ffdd8b2d37bb77167bcc7fedbfe9 (diff)
* vm.c (ENV_IN_HEAP_P): fix off-by-one error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index 3b40498..49cc24e 100644
--- a/vm.c
+++ b/vm.c
@@ -262,7 +262,7 @@ ruby_vm_run_at_exit_hooks(rb_vm_t *vm)
*/
#define ENV_IN_HEAP_P(th, env) \
- (!((th)->stack < (env) && (env) < ((th)->stack + (th)->stack_size)))
+ (!((th)->stack <= (env) && (env) < ((th)->stack + (th)->stack_size)))
#define ENV_VAL(env) ((env)[1])
static void