aboutsummaryrefslogtreecommitdiffstats
path: root/encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/encoding.c b/encoding.c
index fd3344b0ea..b4ee0c8de2 100644
--- a/encoding.c
+++ b/encoding.c
@@ -677,6 +677,7 @@ enc_autoload(rb_encoding *enc)
i = enc->ruby_encoding_index;
enc_register_at(i & ENC_INDEX_MASK, rb_enc_name(enc), base);
((rb_raw_encoding *)enc)->ruby_encoding_index = i;
+ i &= ENC_INDEX_MASK;
}
else {
i = load_encoding(rb_enc_name(enc));