strerror(errno));
return;
}
- ws->name[len - 1] = '\0';
}
}
strerror(errno));
return;
}
- q[len - 1] = '\0';
p = strchr(q, ':');
if (p != NULL)
*p = '\0';
strerror(errno));
return;
}
- s[len - 1] = '\0';
+
idx = strtonum(s, 1, INT_MAX, &errstr);
if (errstr) {
DNPRINTF(SWM_D_MISC, "window idx is %s: %s",
goto done;
}
resp[rbytes] = '\0';
+
+ /* XXX:
+ * Older versions of dmenu (Atleast pre 4.4.1) do not send a
+ * newline, so work around that by sanitizing the resp now.
+ */
+ resp[strcspn(resp, "\n")] = '\0';
len = strlen(resp);
switch (search_resp_action) {