--- dmenu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dmenu.c b/dmenu.c index 818313a..1817582 100644 --- a/dmenu.c +++ b/dmenu.c _AT_@ -282,7 +282,7 @@ match(void) } static void -insert(const char *str, ssize_t n) +insert(const char *str, long n) { if (strlen(text) + n > sizeof text - 1) return; _AT_@ -363,7 +363,7 @@ keypress(XKeyEvent *ev) match(); break; case XK_u: /* delete left */ - insert(NULL, 0 - cursor); + insert(NULL, 0 - (long)cursor); break; case XK_w: /* delete word */ while (cursor > 0 && strchr(worddelimiters, text[nextrune(-1)])) _AT_@ -540,7 +540,7 @@ paste(void) if (XGetWindowProperty(dpy, win, utf8, 0, (sizeof text / 4) + 1, False, utf8, &da, &di, &dl, &dl, (unsigned char **)&p) == Success && p) { - insert(p, (q = strchr(p, '\n')) ? q - p : (ssize_t)strlen(p)); + insert(p, (q = strchr(p, '\n')) ? q - p : (long)strlen(p)); XFree(p); } drawmenu(); -- 2.35.1Received on Fri Sep 02 2022 - 22:38:35 CEST
This archive was generated by hypermail 2.3.0 : Fri Sep 02 2022 - 22:48:36 CEST