summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Adamansky <adamansky@gmail.com>2015-04-27 23:33:56 +0600
committerAnton Adamansky <adamansky@gmail.com>2015-04-27 23:33:56 +0600
commit000984a89f7e015c8d02bbb34cd0833231ea99d8 (patch)
treec50b71157caa95c599cc367e62abf8e676c76788 /src
parent3ee3c44cac0896a9c042658f44f5cc6c92b00690 (diff)
downloadejdb-000984a89f7e015c8d02bbb34cd0833231ea99d8.tar.gz
ejdb-000984a89f7e015c8d02bbb34cd0833231ea99d8.tar.bz2
ejdb-000984a89f7e015c8d02bbb34cd0833231ea99d8.zip
#135
Diffstat (limited to 'src')
-rw-r--r--src/tcutil/tcutil.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tcutil/tcutil.c b/src/tcutil/tcutil.c
index 377555a..22e49ce 100644
--- a/src/tcutil/tcutil.c
+++ b/src/tcutil/tcutil.c
@@ -273,10 +273,9 @@ static void tcvxstrprintf(TCXSTR *xstr, const char *format, va_list ap) {
TCXSTRCAT(xstr, tbuf, tlen);
break;
case 'e': case 'E': case 'f': case 'g': case 'G':
- if (lnum >= 1) {
- //tlen = snprintf(tbuf, sizeof(tbuf), cbuf, va_arg(ap, long double));
- //tlen = tcftoa(va_arg(ap, long double), tbuf, sizeof (tbuf), 6);
- tlen = tcftoa(va_arg(ap, double), tbuf, sizeof (tbuf), 6);
+ if (lnum > 1) {
+ //tlen = snprintf(tbuf, sizeof(tbuf), cbuf, va_arg(ap, long double))
+ tlen = tcftoa(va_arg(ap, long double), tbuf, sizeof (tbuf), 6);
} else {
//tlen = snprintf(tbuf, sizeof(tbuf), cbuf, va_arg(ap, double));
tlen = tcftoa(va_arg(ap, double), tbuf, sizeof (tbuf), 6);