Closed bk138 closed 4 years ago
At https://github.com/octalmage/robotjs/blob/b26c7ee0e3dd05420370350e540c48ae9d38f06c/src/keycode.c#L98, sizeof(void*) bytes (probably 8) are written to a memory segment of 2 bytes (a 16-bit CGKeycode variable), resulting in all kinds of weird behaviour, like unrelated variables getting NULLed.
sizeof(void*)
Making code a a type that can hold sizeof(void*) bytes fixes this.
code
Closes #570
Thank you for your PR
At https://github.com/octalmage/robotjs/blob/b26c7ee0e3dd05420370350e540c48ae9d38f06c/src/keycode.c#L98,
sizeof(void*)
bytes (probably 8) are written to a memory segment of 2 bytes (a 16-bit CGKeycode variable), resulting in all kinds of weird behaviour, like unrelated variables getting NULLed.Making
code
a a type that can holdsizeof(void*)
bytes fixes this.Closes #570