Lian Li Uni Hub: Leave room in the char array for the null character
This commit is contained in:
parent
ac2af0c788
commit
26dfceaf6d
2 changed files with 2 additions and 2 deletions
|
|
@ -647,7 +647,7 @@ std::string LianLiUniHubController::ReadVersion()
|
|||
/*-------------------------------------*\
|
||||
| Format version string |
|
||||
\*-------------------------------------*/
|
||||
char version[14];
|
||||
char version[15];
|
||||
int vlength = std::snprintf(version, sizeof(version), "%x.%x.%x.%x.%x", buffer[0], buffer[1], buffer[2], buffer[3], buffer[4]);
|
||||
|
||||
return(std::string(version, vlength));
|
||||
|
|
|
|||
|
|
@ -735,7 +735,7 @@ std::string LianLiUniHub_AL10Controller::ReadVersion()
|
|||
/*-------------------------------------*\
|
||||
| Format version string |
|
||||
\*-------------------------------------*/
|
||||
char version[14];
|
||||
char version[15];
|
||||
int vlength = std::snprintf(version, sizeof(version), "%x.%x.%x.%x.%x", buffer[0], buffer[1], buffer[2], buffer[3], buffer[4]);
|
||||
|
||||
return(std::string(version, vlength));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue