X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/b2714032e5087e63b5744d3fb8a131e13e1d6f9a..c288663ebdeb78ef50a6378651bb14380ed4b20a:/slstatus.c?ds=sidebyside diff --git a/slstatus.c b/slstatus.c index 5500a62..f06c373 100644 --- a/slstatus.c +++ b/slstatus.c @@ -451,7 +451,7 @@ run_command(const char *cmd) pclose(fp); buf[sizeof(buf) - 1] = '\0'; - if ((nlptr = strstr(buf, "\n")) != NULL) { + if ((nlptr = strrchr(buf, '\n')) != NULL) { nlptr[0] = '\0'; }