aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dmenu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dmenu.c b/dmenu.c
index 78c5a75..3d3a928 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -1,5 +1,6 @@
1/* See LICENSE file for copyright and license details. */ 1/* See LICENSE file for copyright and license details. */
2#include <ctype.h> 2#include <ctype.h>
3#include <limits.h>
3#include <locale.h> 4#include <locale.h>
4#include <stdarg.h> 5#include <stdarg.h>
5#include <stdlib.h> 6#include <stdlib.h>
@@ -629,7 +630,7 @@ setup(int x, int y, int w) {
629 mw = w ? w : DisplayWidth(dpy, screen); 630 mw = w ? w : DisplayWidth(dpy, screen);
630 mh = dc.font.height + 2; 631 mh = dc.font.height + 2;
631 if(y < 0) { 632 if(y < 0) {
632 if(y == ((~(unsigned int)0)/2)+1) 633 if(y == INT_MIN)
633 y = DisplayHeight(dpy, screen) - mh; 634 y = DisplayHeight(dpy, screen) - mh;
634 else 635 else
635 y = (-1 * y) - mh; 636 y = (-1 * y) - mh;
@@ -709,7 +710,7 @@ main(int argc, char *argv[]) {
709 else if(!strcmp(argv[i], "-y")) { 710 else if(!strcmp(argv[i], "-y")) {
710 if(++i < argc) 711 if(++i < argc)
711 if(!strcmp(argv[i], "-0")) 712 if(!strcmp(argv[i], "-0"))
712 y = ((~(unsigned int)0)/2)+1; 713 y = INT_MIN;
713 else 714 else
714 y = atoi(argv[i]); 715 y = atoi(argv[i]);
715 } 716 }