mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
calloc error in cocoa_joystick.m
The calloc call for js->buttons uses 1 instead of sizeof(unsigned char) for the element size.
This commit is contained in:
parent
d97044d9ac
commit
a9be9bc5fc
@ -322,7 +322,7 @@ static void matchCallback(void* context,
|
||||
|
||||
js->axes = calloc(CFArrayGetCount(js->axisElements), sizeof(float));
|
||||
js->buttons = calloc(CFArrayGetCount(js->buttonElements) +
|
||||
CFArrayGetCount(js->hatElements) * 4, 1);
|
||||
CFArrayGetCount(js->hatElements) * 4, sizeof(unsigned char));
|
||||
|
||||
_glfwInputJoystickChange(joy, GLFW_CONNECTED);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user