mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-27 09:23:57 -04:00
Lian Li Uni Hub: Leave room in the char array for the null character
This commit is contained in:
committed by
Adam Honse
parent
ac2af0c788
commit
26dfceaf6d
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user