X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Futil.cpp;h=198267d9eed888cf5fa7cf204f91cba41e72972a;hp=5422d0b46a18cd9ad1a08d57877061aad1da345c;hb=18770118e846622f59a86f9937a33da0bb761775;hpb=95dd79118759f3e14a3d3e093111676e2efea8f9 diff --git a/src/util.cpp b/src/util.cpp index 5422d0b..198267d 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -314,8 +314,12 @@ string vstrprintf(const char *format, va_list ap) int ret; while (true) { +#ifndef _MSC_VER va_list arg_ptr; va_copy(arg_ptr, ap); +#else + va_list arg_ptr = ap; +#endif; #ifdef WIN32 ret = _vsnprintf(p, limit, format, arg_ptr); #else @@ -393,7 +397,7 @@ string FormatMoney(int64 n, bool fPlus) int64 n_abs = (n > 0 ? n : -n); int64 quotient = n_abs/COIN; int64 remainder = n_abs%COIN; - string str = strprintf("%"PRI64d".%08"PRI64d, quotient, remainder); + string str = strprintf("%"PRI64d".%06"PRI64d, quotient, remainder); // Right-trim excess zeros before the decimal point: int nTrim = 0;