summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Pazdiora <[email protected]>2021-01-05 19:34:31 +0100
committerTomáš Pazdiora <[email protected]>2021-01-05 19:34:31 +0100
commitb4749bfb8480ed5c9e6151c0c899027cdc20c22b (patch)
tree955dbe27075cdc219d35a244492b9aae7e9918eb
parentrevert for loop -> do while (according to a1xd's conclusion) (diff)
downloadrawaccel-b4749bfb8480ed5c9e6151c0c899027cdc20c22b.tar.xz
rawaccel-b4749bfb8480ed5c9e6151c0c899027cdc20c22b.zip
bugfix
-rw-r--r--driver/driver.cpp3
1 files changed, 2 insertions, 1 deletions
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)) {