From aaccfd820145abd1a32769a614c495c75fd5fe92 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 5 Jun 2016 19:36:03 +0200 Subject: [PATCH] I don't know how to C Fixes #773. --- README.md | 2 ++ src/input.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 179ee868..d2682b6b 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ does not find Doxygen, the documentation will not be generated. ## Changelog +- Bugfix: The range checks for `glfwSetCursorPos` used the wrong minimum + ## Contact diff --git a/src/input.c b/src/input.c index e63839d6..bb188648 100644 --- a/src/input.c +++ b/src/input.c @@ -332,8 +332,8 @@ GLFWAPI void glfwSetCursorPos(GLFWwindow* handle, double xpos, double ypos) _GLFW_REQUIRE_INIT(); - if (xpos != xpos || xpos < DBL_MIN || xpos > DBL_MAX || - ypos != ypos || ypos < DBL_MIN || ypos > DBL_MAX) + if (xpos != xpos || xpos < -DBL_MAX || xpos > DBL_MAX || + ypos != ypos || ypos < -DBL_MAX || ypos > DBL_MAX) { _glfwInputError(GLFW_INVALID_VALUE, "Invalid cursor position %fx%f",