mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 06:04:34 +00:00
Wayland: Fix wrong array size for _GLFWofferWayland
Closes #2225
(cherry picked from commit 41d8da1cea
)
This commit is contained in:
parent
c7a5333873
commit
b06a91e92b
@ -1678,7 +1678,8 @@ static void dataDeviceHandleDataOffer(void* userData,
|
|||||||
struct wl_data_offer* offer)
|
struct wl_data_offer* offer)
|
||||||
{
|
{
|
||||||
_GLFWofferWayland* offers =
|
_GLFWofferWayland* offers =
|
||||||
realloc(_glfw.wl.offers, _glfw.wl.offerCount + 1);
|
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…
Reference in New Issue
Block a user