Skip to content
Snippets Groups Projects
Commit 7339daad authored by Armin Luntzer's avatar Armin Luntzer
Browse files

vsnprintf: fix infinite loop when float value == 0.0

parent 0e9d376b
No related branches found
No related tags found
No related merge requests found
...@@ -910,7 +910,7 @@ static double get_exp_float_val_param(double value, int *exp, ...@@ -910,7 +910,7 @@ static double get_exp_float_val_param(double value, int *exp,
e++; e++;
} }
} else if (value < 1e-4) { } else if ((value < 1e-4) && (value != 0.0)) {
while (value < 1.0) { while (value < 1.0) {
value *= 10.0; value *= 10.0;
e--; e--;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment