mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Default-initialize number mantissa to zero
This commit is contained in:
parent
98c65a7da7
commit
f5794f1128
2 changed files with 2 additions and 2 deletions
|
@ -185,7 +185,7 @@ NUMBER _createnum( _In_ uint32_t size )
|
|||
{
|
||||
NUMBER num = NUMBER();
|
||||
// Fill mantissa vector with zeros
|
||||
num.mant.insert(num.mant.end(), size, 0);
|
||||
num.mant.insert(num.mant.end(), size - 1, 0);
|
||||
return( num );
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ typedef struct _number
|
|||
// radix being used.
|
||||
int32_t exp; // The offset of digits from the radix point
|
||||
// (decimal point in radix 10)
|
||||
std::vector<MANTTYPE> mant;
|
||||
std::vector<MANTTYPE> mant = {0};
|
||||
} NUMBER;
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue