1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-22 18:28:52 -05:00

Wayland: Fix error type for allocation failure

This commit is contained in:
Camilla Löwy 2022-02-11 12:36:35 +01:00
parent 4a68926bfd
commit 152f50cd01
2 changed files with 2 additions and 2 deletions

View File

@ -1372,7 +1372,7 @@ int _glfwInitWayland(void)
_glfw.wl.clipboardString = _glfw_calloc(_glfw.wl.clipboardSize, 1); _glfw.wl.clipboardString = _glfw_calloc(_glfw.wl.clipboardSize, 1);
if (!_glfw.wl.clipboardString) if (!_glfw.wl.clipboardString)
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, _glfwInputError(GLFW_OUT_OF_MEMORY,
"Wayland: Unable to allocate clipboard memory"); "Wayland: Unable to allocate clipboard memory");
return GLFW_FALSE; return GLFW_FALSE;
} }

View File

@ -1675,7 +1675,7 @@ static GLFWbool growClipboardString(void)
clipboard = _glfw_realloc(clipboard, _glfw.wl.clipboardSize * 2); clipboard = _glfw_realloc(clipboard, _glfw.wl.clipboardSize * 2);
if (!clipboard) if (!clipboard)
{ {
_glfwInputError(GLFW_PLATFORM_ERROR, _glfwInputError(GLFW_OUT_OF_MEMORY,
"Wayland: Impossible to grow clipboard string"); "Wayland: Impossible to grow clipboard string");
return GLFW_FALSE; return GLFW_FALSE;
} }