diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-31 14:54:52 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-31 14:54:52 +0900 |
| commit | 0d8adaaaa16859342a37e3bf6832a8717c54f27c (patch) | |
| tree | 42e72791697e65acf4736492c721e0b11a8e750e /src | |
| parent | 708c455833a543c8140f0759f16317a347b7660e (diff) | |
| download | mruby-0d8adaaaa16859342a37e3bf6832a8717c54f27c.tar.gz mruby-0d8adaaaa16859342a37e3bf6832a8717c54f27c.zip | |
wrong String#index behavior on udef INCLUDE_ENCODING
Diffstat (limited to 'src')
| -rw-r--r-- | src/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c index a5de9f557..22e3dad60 100644 --- a/src/string.c +++ b/src/string.c @@ -1411,7 +1411,7 @@ mrb_str_index(mrb_state *mrb, mrb_value str, mrb_value sub, mrb_int offset) s = t; } #else - pos = mrb_memsearch(sptr, slen, s+offset, len-offset); + pos = mrb_memsearch(sptr, slen, s, len); if (pos < 0) return pos; #endif //INCLUDE_ENCODING return pos + offset; |
