mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-24 08:37:42 +00:00
I discovered this while working on #4586. The code in question was updating `*puKey` and then trying to dereference the array on the basis of its new value, which (a) would give the wrong result, and (b) could be reading off the end of the array (although not crashing it seems), e.g. for `"` -> `VK_QUOTE`, which has a value of `0xDE`. I am guessing that the reason we have not seen any bug reports on this is that the keystroke handler falls back to an alternate code path, so in the vast majority of cases, keyboards would continue to work correctly. Furthermore, the test was just for truthiness of the `BOOL` so probably at least 50% of the time we'd have been okay anyway. Or something. Anyway, I reckon this is better. |
||
|---|---|---|
| .. | ||
| src | ||