mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Fix for {.0f} precision in plFormat()
This commit is contained in:
@ -406,7 +406,7 @@ PL_FORMAT_IMPL(double)
|
||||
size_t end = 0;
|
||||
|
||||
format_buffer[end++] = '%';
|
||||
if (format.fPrecision) {
|
||||
if (format.fPrecision >= 0) {
|
||||
int count = snprintf(format_buffer + end, arrsize(format_buffer) - end,
|
||||
".%d", format.fPrecision);
|
||||
|
||||
|
@ -115,7 +115,7 @@ namespace plFormat_Private
|
||||
struct FormatSpec
|
||||
{
|
||||
int fMinimumLength = 0; /**< Requested minimum padding length */
|
||||
int fPrecision = 0; /**< Requested precision for floating-point */
|
||||
int fPrecision = -1; /**< Requested precision for floating-point */
|
||||
|
||||
char fPadChar = 0; /**< Explicit padding char (default is space) */
|
||||
Alignment fAlignment = kAlignDefault; /**< Requested pad alignment */
|
||||
|
Reference in New Issue
Block a user