Commit 2ffcf440 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Update round_limb on first limb length change in printf.

parent 157a84a1
......@@ -704,11 +704,25 @@ static inline int FUNC_NAME(pf_output_fp)(FUNC_NAME(puts_clbk) pf_puts, void *pu
if(i != first_limb_len) {
first_limb_len = i;
radix_pos++;
round_pos++;
if (round_pos == LIMB_DIGITS)
{
round_pos = 0;
round_limb++;
}
}
} else if(i == b->e) {
first_limb_len = 1;
radix_pos++;
b->e++;
round_pos++;
if (round_pos == LIMB_DIGITS)
{
round_pos = 0;
round_limb++;
}
}
}
}
......
......@@ -819,6 +819,7 @@ static void test_printf_fp(void)
{ "%.0f", 0.5, { "1", NULL, NULL, NULL, "0" }, {NULL, NULL, NULL, NULL, "1" }},
{ "%.0f", 1.5, { "2" }},
{ "%.0f", 2.5, { "3", NULL, NULL, NULL, "2" }, {NULL, NULL, NULL, NULL, "3" }},
{ "%g", 9.999999999999999e-5, { "0.0001" }},
};
const char *res = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment