lcd4l: fix -Wformat-truncation warning

This commit is contained in:
MarkusVolk
2020-01-24 18:24:30 +01:00
parent 0e7170fe98
commit 4836eb8f75
2 changed files with 2 additions and 2 deletions

View File

@@ -1222,7 +1222,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);
}