aboutsummaryrefslogtreecommitdiffstats
path: root/encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c
index 9655213f73..908a6458a0 100644
--- a/encoding.c
+++ b/encoding.c
@@ -608,7 +608,7 @@ rb_enc_init(void)
rb_encoding *
rb_enc_from_index(int index)
{
- if (index < 0 || enc_table.count <= (index &= ENC_INDEX_MASK)) {
+ if (UNLIKELY(index < 0 || enc_table.count <= (index &= ENC_INDEX_MASK))) {
return 0;
}
return enc_table.list[index].enc;