From 8c985ff851158b2fa46ae08c09c1437dfef90912 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 16 May 2022 14:11:49 +0900 Subject: [PATCH] string.c (mrb_str_index_m): no need to align the position; ref #4569 --- src/string.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/string.c b/src/string.c index f6f97c7df..217cf3c72 100644 --- a/src/string.c +++ b/src/string.c @@ -1772,7 +1772,6 @@ mrb_str_index_m(mrb_state *mrb, mrb_value str) pos = str_index_str_by_char(mrb, str, sub, pos); if (pos == -1) return mrb_nil_value(); - BYTES_ALIGN_CHECK(pos); return mrb_int_value(mrb, pos); }