diff --git a/src/CalcManager/Ratpack/conv.cpp b/src/CalcManager/Ratpack/conv.cpp index 8de52a6e..2ae5f5c3 100644 --- a/src/CalcManager/Ratpack/conv.cpp +++ b/src/CalcManager/Ratpack/conv.cpp @@ -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 - 1, 0); + num.mant.insert(num.mant.end(), size, 0); return( num ); } diff --git a/src/CalcManager/Ratpack/ratpak.h b/src/CalcManager/Ratpack/ratpak.h index 00095c36..9a8fe5cd 100644 --- a/src/CalcManager/Ratpack/ratpak.h +++ b/src/CalcManager/Ratpack/ratpak.h @@ -56,11 +56,11 @@ typedef enum eANGLE_TYPE ANGLE_TYPE; typedef struct _number { - int32_t sign; // The sign of the mantissa, +1, or -1 - int32_t cdigit; // The number of digits, or what passes for digits in the - // radix being used. - int32_t exp; // The offset of digits from the radix point - // (decimal point in radix 10) + int32_t sign = 1; // The sign of the mantissa, +1, or -1 + int32_t cdigit = 0; // The number of digits, or what passes for digits in the + // radix being used. + int32_t exp = 0; // The offset of digits from the radix point + // (decimal point in radix 10) std::vector mant; } NUMBER;