From 5945dd4c5a5208fc5572c75daa2c63f5cf6f12d9 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Mon, 10 Oct 2022 17:06:38 +0800 Subject: [PATCH] fix(shell): lastWord need add one byte --- src/kit/shell/src/shellAuto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kit/shell/src/shellAuto.c b/src/kit/shell/src/shellAuto.c index fc78361f95..d1c299ab22 100644 --- a/src/kit/shell/src/shellAuto.c +++ b/src/kit/shell/src/shellAuto.c @@ -1251,7 +1251,7 @@ char * lastWord(char * p) { char * p2 = strrchr(p, ','); if (p1 && p2) { - return p1 > p2 ? p1 : p2 + 1; + return p1 > p2 ? p1 + 1 : p2 + 1; } else if (p1) { return p1 + 1; } else if(p2) { -- GitLab