diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-01-04 14:27:58 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-01-04 14:27:58 +0900 |
| commit | acb1fdc79fb1a18f843a49e8c7dd58a5610678c7 (patch) | |
| tree | 1303616b90e0a6801f3dcb57ea232d9ca337b10f | |
| parent | cca19532c5f71e1bdc0b4947b2fcddd181f27781 (diff) | |
| parent | 668d632c6e7c4a0ad89cc262d6124ad42a9e664f (diff) | |
| download | mruby-acb1fdc79fb1a18f843a49e8c7dd58a5610678c7.tar.gz mruby-acb1fdc79fb1a18f843a49e8c7dd58a5610678c7.zip | |
Merge pull request #4212 from shuujii/pack-remove-float-check
pack: Remove redundant float check in pack_utf8()
| -rw-r--r-- | mrbgems/mruby-pack/src/pack.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/mrbgems/mruby-pack/src/pack.c b/mrbgems/mruby-pack/src/pack.c index f274ff11e..2e68f35ed 100644 --- a/mrbgems/mruby-pack/src/pack.c +++ b/mrbgems/mruby-pack/src/pack.c @@ -457,11 +457,6 @@ pack_utf8(mrb_state *mrb, mrb_value o, mrb_value str, mrb_int sidx, long count, int len = 0; uint32_t c = 0; -#ifndef MRB_WITHOUT_FLOAT - if (mrb_float_p(o)) { - goto range_error; - } -#endif c = (uint32_t)mrb_fixnum(o); /* Unicode character */ @@ -489,9 +484,6 @@ pack_utf8(mrb_state *mrb, mrb_value o, mrb_value str, mrb_int sidx, long count, len = 4; } else { -#ifndef MRB_WITHOUT_FLOAT -range_error: -#endif mrb_raise(mrb, E_RANGE_ERROR, "pack(U): value out of range"); } |
