mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-13 07:01:18 +10:00
Address review validation nits
Agent-Logs-Url: https://github.com/meshtastic/firmware/sessions/6b1d6cf6-ed6b-43b6-95cb-8e141757664e Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
This commit is contained in:
co-authored by
thebentern
parent
ebc5b63035
commit
796d4552f9
@@ -16,7 +16,7 @@ void copyNodeLongNameOrUnknown(char *dest, size_t destSize, const meshtastic_Nod
|
||||
if (!dest || destSize == 0)
|
||||
return;
|
||||
const char *name = (node && nodeInfoLiteHasUser(node) && node->long_name[0]) ? node->long_name : "Unknown";
|
||||
strncpy(dest, name, destSize);
|
||||
strncpy(dest, name, destSize - 1);
|
||||
dest[destSize - 1] = '\0';
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user