From b4749bfb8480ed5c9e6151c0c899027cdc20c22b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Pazdiora?= Date: Tue, 5 Jan 2021 19:34:31 +0100 Subject: bugfix --- driver/driver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver/driver.cpp b/driver/driver.cpp index 1cdfadf..8b72562 100644 --- a/driver/driver.cpp +++ b/driver/driver.cpp @@ -56,7 +56,8 @@ Arguments: bool devMatch = true; if (global.args.device_hw_id[0] != 0) { - devMatch = wcsncmp(devExt->hwid, global.args.device_hw_id, sizeof(global.args.device_hw_id)) == 0; + size_t max_cnt = sizeof(global.args.device_hw_id) / sizeof(global.args.device_hw_id[0]); + devMatch = wcsncmp(devExt->hwid, global.args.device_hw_id, max_cnt) == 0; } if (!(InputDataStart->Flags & MOUSE_MOVE_ABSOLUTE)) { -- cgit v1.2.3