From 0084b159590a5f9c24f7c27af8fa532ce35cfb03 Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Mon, 15 Jul 2019 11:17:33 +0800 Subject: [PATCH] fix left/bs for release build --- src/kit/shell/shellCommand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kit/shell/shellCommand.c b/src/kit/shell/shellCommand.c index 72e669d8b2..70abc7b43c 100644 --- a/src/kit/shell/shellCommand.c +++ b/src/kit/shell/shellCommand.c @@ -57,7 +57,8 @@ void getPrevCharSize(const char *str, int pos, int *size, int *width) { if (str[pos] > 0 || countPrefixOnes(str[pos]) > 1) break; } - assert(mbtowc(&wc, str + pos, MB_CUR_MAX) == *size); + int rc = mbtowc(&wc, str + pos, MB_CUR_MAX); + assert(rc == *size); *width = wcwidth(wc); }