ftdipp_mpsse: fix format-zero-length snprintf -> memset

This commit is contained in:
Gwenhael Goavec-Merou 2023-08-03 07:43:56 +02:00
parent 0e1e07262c
commit 6ef87c5466
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ void FTDIpp_MPSSE::open_device(const std::string &serial, unsigned int baudrate)
if (ret < 0) {
char description[256];
if (_bus == 0 || _addr == 0)
snprintf(description, sizeof(description), "");
memset(description, '\0', 256);
else
#if (FTDI_VERSION < 104)
snprintf(description, sizeof(description), "");