jscript: Fix toExponential behavior when exponent is 0.

This commit is contained in:
Piotr Caban 2012-04-25 12:10:18 +02:00 committed by Alexandre Julliard
parent 99c6eb0dd0
commit cc6205f10c

View file

@ -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;