From a8deae5ed66e64eff74fba14bc081d91f85ceb4b Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Thu, 30 May 2019 09:22:02 -0400 Subject: [PATCH] wl_desktop_shell: Fix _validate_size_negative function As this function is used to check if a given value is negative, the comparison should check for Less than Zero as a given value of Zero is not negative @fix --- src/modules/wl_desktop_shell/xdg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wl_desktop_shell/xdg.c b/src/modules/wl_desktop_shell/xdg.c index e5e47c197..1c9bd3bfa 100644 --- a/src/modules/wl_desktop_shell/xdg.c +++ b/src/modules/wl_desktop_shell/xdg.c @@ -56,7 +56,7 @@ _validate_size(struct wl_resource *resource, int32_t value) static void _validate_size_negative(struct wl_resource *resource, int32_t value) { - if (value <= 0) + if (value < 0) wl_resource_post_error(resource, XDG_POSITIONER_ERROR_INVALID_INPUT, "Invalid size passed"); }