diff options
| author | Tomáš Pazdiora <[email protected]> | 2021-01-05 19:34:31 +0100 |
|---|---|---|
| committer | Tomáš Pazdiora <[email protected]> | 2021-01-05 19:34:31 +0100 |
| commit | b4749bfb8480ed5c9e6151c0c899027cdc20c22b (patch) | |
| tree | 955dbe27075cdc219d35a244492b9aae7e9918eb /driver | |
| parent | revert for loop -> do while (according to a1xd's conclusion) (diff) | |
| download | rawaccel-b4749bfb8480ed5c9e6151c0c899027cdc20c22b.tar.xz rawaccel-b4749bfb8480ed5c9e6151c0c899027cdc20c22b.zip | |
bugfix
Diffstat (limited to 'driver')
| -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)) { |