Wayland: Fix wrong array size for _GLFWofferWayland

Closes #2225
master
Takuro Ashie ago%!(EXTRA string=2 years) committed by GitHub
parent 00967cbb8a
commit 41d8da1cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/wl_window.c

@ -1640,7 +1640,8 @@ static void dataDeviceHandleDataOffer(void* userData,
struct wl_data_offer* offer) struct wl_data_offer* offer)
{ {
_GLFWofferWayland* offers = _GLFWofferWayland* offers =
_glfw_realloc(_glfw.wl.offers, _glfw.wl.offerCount + 1); _glfw_realloc(_glfw.wl.offers,
sizeof(_GLFWofferWayland) * (_glfw.wl.offerCount + 1));
if (!offers) if (!offers)
{ {
_glfwInputError(GLFW_OUT_OF_MEMORY, NULL); _glfwInputError(GLFW_OUT_OF_MEMORY, NULL);

Loading…
Cancel
Save