summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c
index 609c68784..e05c6f749 100644
--- a/src/string.c
+++ b/src/string.c
@@ -1805,7 +1805,7 @@ mrb_str_split_m(mrb_state *mrb, mrb_value str)
mrb_int idx = 0;
int ai = mrb_gc_arena_save(mrb);
- while (idx < str_len && 1) {
+ while (idx < str_len) {
if (pat_len > 0) {
end = mrb_memsearch(RSTRING_PTR(spat), pat_len, RSTRING_PTR(str)+idx, str_len - idx);
if (end < 0) break;