diff --git a/src/string.c b/src/string.c index e214ad4c2..780ab4e5e 100644 --- a/src/string.c +++ b/src/string.c @@ -578,7 +578,7 @@ str_index_str_by_char(mrb_state *mrb, mrb_value str, mrb_value sub, mrb_int pos) * fixed potential buffer overflow */ static inline mrb_int -memsearch_swar(const char *xs, long m, const char *ys, long n) +memsearch_swar(const char *xs, mrb_int m, const char *ys, mrb_int n) { #ifdef MRB_64BIT #define bitint uint64_t @@ -641,9 +641,9 @@ memsearch_swar(const char *xs, long m, const char *ys, long n) const char *p = s0; const char *e = ys + n; for (;p