diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-02-03 16:10:34 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-02-03 16:10:34 -0800 |
| commit | 70eaa9d58e6141248b2e035379d2f4a3f96976a5 (patch) | |
| tree | e80010eec27e979eb329de2ad84a10ccf8b17eab /src/numeric.c | |
| parent | e887059cbf7e84e87525d9d330a0ce50da79f5e3 (diff) | |
| parent | 641fc9902f6dd8c7b647a1bd61ee6fd9243acb34 (diff) | |
| download | mruby-70eaa9d58e6141248b2e035379d2f4a3f96976a5.tar.gz mruby-70eaa9d58e6141248b2e035379d2f4a3f96976a5.zip | |
Merge pull request #815 from masamitsu-murase/modify_handling_of_large_fixnum
Modify handling of large fixnum
Diffstat (limited to 'src/numeric.c')
| -rw-r--r-- | src/numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/numeric.c b/src/numeric.c index 8bf2b3382..f6894a57b 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -1160,7 +1160,7 @@ fix_minus(mrb_state *mrb, mrb_value self) mrb_value mrb_fix2str(mrb_state *mrb, mrb_value x, int base) { - char buf[64], *b = buf + sizeof buf; + char buf[sizeof(mrb_int)*CHAR_BIT+2], *b = buf + sizeof buf; mrb_int val = mrb_fixnum(x); int neg = 0; |
