diff options
Diffstat (limited to 'driver/driver.cpp')
| -rw-r--r-- | driver/driver.cpp | 3 |
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)) { |