mirror of
https://github.com/meshtastic/firmware.git
synced 2026-05-31 12:18:18 -04:00
Enhance UTF-8 sanitization logic and add delays in test setup for reliable timing
This commit is contained in:
@@ -124,10 +124,10 @@ bool sanitizeUtf8(char *buf, size_t bufSize)
|
||||
if (!buf || bufSize == 0)
|
||||
return false;
|
||||
|
||||
// Ensure null-terminated within buffer
|
||||
// Ensure null-terminated within buffer; report if we had to enforce it
|
||||
bool replaced = (buf[bufSize - 1] != '\0');
|
||||
buf[bufSize - 1] = '\0';
|
||||
|
||||
bool replaced = false;
|
||||
size_t i = 0;
|
||||
size_t len = strlen(buf);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user