diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-11-01 22:52:12 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-11-01 22:52:12 +0900 |
| commit | 7ad53273a2c5346557a233d040ad233019c03277 (patch) | |
| tree | 94082e60e25971dc31ab16db13b9b90b3aa8ac3e /mrbgems/mruby-string-ext/src/string.c | |
| parent | d68da042b3666c1e46e4d3cf1a14e708df89f440 (diff) | |
| download | mruby-7ad53273a2c5346557a233d040ad233019c03277.tar.gz mruby-7ad53273a2c5346557a233d040ad233019c03277.zip | |
Silence Appveyor's VC compilation warnings.
Diffstat (limited to 'mrbgems/mruby-string-ext/src/string.c')
| -rw-r--r-- | mrbgems/mruby-string-ext/src/string.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mrbgems/mruby-string-ext/src/string.c b/mrbgems/mruby-string-ext/src/string.c index 9fd84af7b..c0105fbd9 100644 --- a/mrbgems/mruby-string-ext/src/string.c +++ b/mrbgems/mruby-string-ext/src/string.c @@ -279,7 +279,7 @@ static struct tr_pattern* tr_parse_pattern(mrb_state *mrb, struct tr_pattern *ret, const mrb_value v_pattern, mrb_bool flag_reverse_enable) { const char *pattern = RSTRING_PTR(v_pattern); - int pattern_length = RSTRING_LEN(v_pattern); + mrb_int pattern_length = RSTRING_LEN(v_pattern); mrb_bool flag_reverse = FALSE; struct tr_pattern *pat1; int i = 0; @@ -438,7 +438,8 @@ str_tr(mrb_state *mrb, mrb_value str, mrb_value p1, mrb_value p2, mrb_bool squee mrb_raisef(mrb, E_ARGUMENT_ERROR, "character (%S) out of range", mrb_fixnum_value((mrb_int)c)); } - lastch = s[i] = c; + lastch = c; + s[i] = (char)c; } } } |
