Remove null terminations in fwver string when reading from Steelseries Apex keyboards.

This commit is contained in:
Joseph East 2022-11-18 22:19:46 +10:30
parent 6cb1169801
commit a1be27ad61

View file

@ -102,6 +102,7 @@ public:
if(result > 0)
{
std::string fwver(ibuf, ibuf+STEELSERIES_PACKET_IN_SIZE);
fwver = fwver.c_str();
/*---------------------------------------*\
| Find 2 periods in string, if found we |
@ -133,6 +134,7 @@ public:
if(result > 0)
{
std::string fwver(ibuf, ibuf+STEELSERIES_PACKET_IN_SIZE);
fwver = fwver.c_str();
std::size_t majorp = fwver.find('.');
if(majorp != std::string::npos)