Klaus Demo nginx / 50af406
fix rounding issues in %f format Igor Sysoev 12 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
385385 * (int64_t) cast is required for msvc6:
386386 * it can not convert uint64_t to double
387387 */
388 ui64 = (uint64_t) ((f - (int64_t) ui64) * scale);
388 ui64 = (uint64_t) ((f - (int64_t) ui64) * scale + 0.5);
389389
390390 buf = ngx_sprintf_num(buf, last, ui64, '0', 0, frac_width);
391391 }