Skip to content

Commit 0af6777

Browse files
authored
Merge pull request #288 from SemvdH/master
Initialize newResponse manually
2 parents e2cc873 + 52f7538 commit 0af6777

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ELMduino.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2610,7 +2610,9 @@ void ELM327::parseMultiLineResponse() {
26102610
uint8_t totalBytes = 0;
26112611
uint8_t bytesReceived = 0;
26122612
bool headerFound = false;
2613-
char newResponse[PAYLOAD_LEN] = {0};
2613+
char newResponse[PAYLOAD_LEN];
2614+
memset(newResponse, 0, PAYLOAD_LEN * sizeof(char)); // Initialize newResponse to empty string
2615+
26142616
char line[256] = "";
26152617
char* start = payload;
26162618
char* end = strchr(start, '\r');

0 commit comments

Comments
 (0)