Skip to content

Commit c5de6b4

Browse files
committed
Fixes String(float) issue with Stack Smashing
1 parent caef400 commit c5de6b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/esp32/WString.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ String::String(unsigned long value, unsigned char base) {
114114

115115
String::String(float value, unsigned char decimalPlaces) {
116116
init();
117-
char buf[33];
117+
char buf[34];
118118
*this = dtostrf(value, (decimalPlaces + 2), decimalPlaces, buf);
119119
}
120120

121121
String::String(double value, unsigned char decimalPlaces) {
122122
init();
123-
char buf[33];
123+
char buf[34];
124124
*this = dtostrf(value, (decimalPlaces + 2), decimalPlaces, buf);
125125
}
126126

0 commit comments

Comments
 (0)