Commit cc6205f1 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

jscript: Fix toExponential behavior when exponent is 0.

parent 99c6eb0d
......@@ -206,9 +206,12 @@ static inline void number_to_exponential(double val, int prec, BSTR *out)
str[size++] = '-';
dec_point = -dec_point;
}
for(str[size]='0', size+=exp_size-1; dec_point>0; dec_point/=10)
str[size--] = '0'+dec_point%10;
size += exp_size+1;
size += exp_size;
do {
str[--size] = '0'+dec_point%10;
dec_point /= 10;
}while(dec_point>0);
size += exp_size;
str[size] = 0;
*out = str;
......
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