From: Denys Vlasenko Date: Fri, 29 Mar 2013 12:21:53 +0000 (+0100) Subject: lineedit: \W on "/bin" should show "bin", not "/bin" X-Git-Tag: 1_22_0~209 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8172d054db64bc80a355db111b484719930045bc;p=oweals%2Fbusybox.git lineedit: \W on "/bin" should show "bin", not "/bin" function old new delta parse_and_put_prompt 793 785 -8 Signed-off-by: Denys Vlasenko --- diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 45448dfab..93ab86426 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1875,7 +1875,7 @@ static void parse_and_put_prompt(const char *prmt_ptr) if (c == 'w') break; cp = strrchr(pbuf, '/'); - if (cp != NULL && cp != pbuf) + if (cp) pbuf = (char*)cp + 1; break; # endif