mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 751412 - Add missing buffer null-termination in CreateDecimalRepresentation, r=njn
This commit is contained in:
parent
3b21fd29c5
commit
3442e45421
@ -98,7 +98,8 @@ void DoubleToStringConverter::CreateExponentialRepresentation(
|
||||
}
|
||||
ASSERT(exponent < 1e4);
|
||||
const int kMaxExponentLength = 5;
|
||||
char buffer[kMaxExponentLength];
|
||||
char buffer[kMaxExponentLength + 1];
|
||||
buffer[kMaxExponentLength] = '\0';
|
||||
int first_char_pos = kMaxExponentLength;
|
||||
while (exponent > 0) {
|
||||
buffer[--first_char_pos] = '0' + (exponent % 10);
|
||||
|
Loading…
Reference in New Issue
Block a user