Permalink
Browse files

Fixed a wrong condition; fix #3550

Shared TT_ENV should be unshared. Reversed condition.
  • Loading branch information...
matz committed Apr 18, 2017
1 parent e8dca6b commit ae4217e813a1067824965ad3ddc686e2dc30fddd
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gc.c
View
@@ -769,7 +769,7 @@ obj_free(mrb_state *mrb, struct RBasic *obj, int end)
while (ce <= ci) {
struct REnv *e = ci->env;
if (e && !is_dead(&mrb->gc, e) &&
e->tt == MRB_TT_ENV && MRB_ENV_STACK_SHARED_P(e)) {
e->tt == MRB_TT_ENV && !MRB_ENV_STACK_SHARED_P(e)) {
mrb_env_unshare(mrb, e);
}
ci--;

0 comments on commit ae4217e

Please sign in to comment.