From 2f9048b2ae3f92c5963a01c06c99206a02ca157a Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Mon, 10 Oct 2022 17:02:48 +0800 Subject: [PATCH] feat(shell): lastWord function less add one --- tools/shell/src/shellAuto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 5db9b47a5f..506897cf5b 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -1268,7 +1268,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