Missing the end pointer reference solves #5760

Exiting from the unescape call the content in buffer still contains the original string. The result of unescape elaboration works well, but the rest of the string is still there and in the printf in the main program infact is printed overlapped to the previous content.
TY MauroS for the hint.
This commit is contained in:
Andrea Pede 2019-05-09 11:26:20 +02:00 committed by GitHub
parent 889b01779d
commit 5b5272e684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ char* Unescape(char* buffer, uint16_t* size)
} }
} }
*size = end_size; *size = end_size;
*write++ = 0; // add the end string pointer reference
// AddLogBuffer(LOG_LEVEL_DEBUG, (uint8_t*)buffer, *size); // AddLogBuffer(LOG_LEVEL_DEBUG, (uint8_t*)buffer, *size);
return buffer; return buffer;