diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-05 22:21:12 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-05 23:31:50 +0900 |
| commit | cc04f033935c167aaf7013201aa25d82fe762d1c (patch) | |
| tree | 593d7b1ff06dcf11fa102fa342ad95835d46415e /mrbgems/mruby-sprintf | |
| parent | 2ef5d22b604711dba489b351fc3f2e6b4b44e5b1 (diff) | |
| download | mruby-cc04f033935c167aaf7013201aa25d82fe762d1c.tar.gz mruby-cc04f033935c167aaf7013201aa25d82fe762d1c.zip | |
`print("%d", 0)` should not print `-0`; fix #3731
Diffstat (limited to 'mrbgems/mruby-sprintf')
| -rw-r--r-- | mrbgems/mruby-sprintf/src/sprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c index e02627b86..201e836cc 100644 --- a/mrbgems/mruby-sprintf/src/sprintf.c +++ b/mrbgems/mruby-sprintf/src/sprintf.c @@ -847,7 +847,7 @@ retry: } if (sign) { - if (v > 0) { + if (v >= 0) { if (flags & FPLUS) { sc = '+'; width--; |
