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",