ICU-66 Fixed an array bounds problem

X-SVN-Rev: 3644
This commit is contained in:
George Rhoten 2001-02-16 21:42:57 +00:00
parent 4b1be3269e
commit ee518c0ab4
2 changed files with 2 additions and 2 deletions

View File

@ -299,7 +299,7 @@ void
DigitList::set(double source, int32_t maximumDigits, UBool fixedPoint)
{
// for now, simple implementation; later, do proper IEEE stuff
char rep[MAX_DIGITS + 7]; // Extra space for '.', e+NNN, and '\0' (actually +7 is enough)
char rep[MAX_DIGITS + 8]; // Extra space for '+', '.', e+NNN, and '\0' (actually +8 is enough)
char *digitPtr = fDigits;
char *repPtr = rep + 2; // +2 to skip the sign and decimal
int32_t exponent = 0;

View File

@ -299,7 +299,7 @@ void
DigitList::set(double source, int32_t maximumDigits, UBool fixedPoint)
{
// for now, simple implementation; later, do proper IEEE stuff
char rep[MAX_DIGITS + 7]; // Extra space for '.', e+NNN, and '\0' (actually +7 is enough)
char rep[MAX_DIGITS + 8]; // Extra space for '+', '.', e+NNN, and '\0' (actually +8 is enough)
char *digitPtr = fDigits;
char *repPtr = rep + 2; // +2 to skip the sign and decimal
int32_t exponent = 0;