diff --git a/src/kit/shell/shellCommand.c b/src/kit/shell/shellCommand.c index 72e669d8b29a398d3542e56b2f0e8e510d0f120c..70abc7b43c0477e64a980a5deb1e212a0097d317 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); }