lcd4l: fix -Wformat-truncation warning

Origin commit data
------------------
Commit: 0efef8f150
Author: Markus Volk <f_l_k@t-online.de>
Date: 2020-01-24 (Fri, 24 Jan 2020)
This commit is contained in:
Markus Volk
2020-01-24 22:04:09 +01:00
committed by vanhofen
parent 910a470d00
commit 86e7933375
2 changed files with 2 additions and 2 deletions

View File

@@ -1185,7 +1185,7 @@ void CLCD4l::strReplace(std::string &orig, const std::string &fstr, const std::s
std::string CLCD4l::hexStr(unsigned char data)
{
char hexstr[3];
char hexstr[4];
snprintf(hexstr, sizeof hexstr, "%02x", (int)data * 255 / 100);
return std::string(hexstr);
}