AP_UAVCAN: fixed string warnings

This commit is contained in:
Andrew Tridgell 2020-09-07 18:30:05 +10:00
parent 930726ca9a
commit 6803408453
1 changed files with 1 additions and 1 deletions

View File

@ -552,7 +552,7 @@ void trampoline_handleNodeInfo(const uavcan::ServiceCallResult<uavcan::protocol:
uavcan::copy(resp.getResponse().hardware_version.unique_id.begin(),
resp.getResponse().hardware_version.unique_id.end(),
unique_id);
strncpy(name, resp.getResponse().name.c_str(), sizeof(name)-1);
strncpy_noterm(name, resp.getResponse().name.c_str(), sizeof(name)-1);
AP::uavcan_dna_server().handleNodeInfo(node_id, unique_id, name);
}