Remove null terminations in fwver string when reading from Steelseries Apex keyboards.
This commit is contained in:
parent
6cb1169801
commit
a1be27ad61
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue