mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
jscript: Fix toExponential behavior when exponent is 0.
This commit is contained in:
parent
99c6eb0dd0
commit
cc6205f10c
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue