Wayland: Fix error type for allocation failure

(cherry picked from commit 152f50cd01)
This commit is contained in:
Camilla Löwy 2022-02-11 12:36:35 +01:00 committed by Camilla Löwy
parent 7a4813cedd
commit 9340324380
2 changed files with 2 additions and 2 deletions

View File

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

View File

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