diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-11-19 03:04:50 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-11-19 22:49:50 +0900 |
| commit | 09abdcb5e899eb0e48b9ed11e93820eac8c511e4 (patch) | |
| tree | 1a46f4267332f834cc501cb2a0ebcf8ab415c930 /mrbgems/mruby-sprintf/src | |
| parent | 1a9b607a4d92d0803402799b090785cfb83f02a7 (diff) | |
| download | mruby-09abdcb5e899eb0e48b9ed11e93820eac8c511e4.tar.gz mruby-09abdcb5e899eb0e48b9ed11e93820eac8c511e4.zip | |
negative binary format should not be masked by 10bits; ref #3025
Diffstat (limited to 'mrbgems/mruby-sprintf/src')
| -rw-r--r-- | mrbgems/mruby-sprintf/src/sprintf.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c index 28efab997..b2caa4220 100644 --- a/mrbgems/mruby-sprintf/src/sprintf.c +++ b/mrbgems/mruby-sprintf/src/sprintf.c @@ -79,10 +79,6 @@ mrb_fix2binstr(mrb_state *mrb, mrb_value x, int base) if (base != 2) { mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid radix %S", mrb_fixnum_value(base)); } - - if (val >= (1 << 10)) - val &= 0x3ff; - if (val == 0) { return mrb_str_new_lit(mrb, "0"); } |
