Skip to content

Commit b68b63e

Browse files
Fix warning in LianLiUniHubSLController
1 parent 84bb05d commit b68b63e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Controllers/LianLiController/LianLiUniHubSLController/LianLiUniHubSLController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ void LianLiUniHubSLController::SendMerge()
329329
void LianLiUniHubSLController::SendColor(size_t channel, const unsigned char *colors, size_t num_colors)
330330
{
331331
unsigned char* buf = new unsigned char[2 + num_colors];
332-
memset(buf, 0x00, sizeof(buf));
332+
memset(buf, 0x00, (2 + num_colors));
333333

334334
buf[0x00] = UNIHUB_SL_REPORT_ID;
335335
buf[0x01] = 0x30 + channel; // Channel 1: 0x30, Channel 2: 0x31, etc.

0 commit comments

Comments
 (0)