summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-06 08:59:41 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-06 08:59:41 +0000
commit7881363731eb4695c745b49ad67652ae8062f995 (patch)
tree2f7eca34d979d1873f34daba9cbdac950777184a /missing
parent3edb155cd1bab6d1c66ae2c786cfdb71d5d8113d (diff)
* gc.c (ruby_xmalloc): remove MALLOC_LIMIT to avoid frequent
garabage collection. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r--missing/vsnprintf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c
index b21261d..266290a 100644
--- a/missing/vsnprintf.c
+++ b/missing/vsnprintf.c
@@ -1018,8 +1018,11 @@ cvt(value, ndigits, flags, sign, decpt, ch, length)
if (value < 0) {
value = -value;
*sign = '-';
- } else
- *sign = '\000';
+ } else if (value == 0.0 && 1.0/value < 0) {
+ *sign = '-';
+ } else {
+ *sign = '\000';
+ }
digits = BSD__dtoa(value, mode, ndigits, decpt, &dsgn, &rve);
if (flags & ALT) { /* Print trailing zeros */
bp = digits + ndigits;