Skip to content

Commit

Permalink
Merge pull request #27 from amosbird/t2
Browse files Browse the repository at this point in the history
fix left/bs for release build
  • Loading branch information
guanshengliang authored Jul 16, 2019
2 parents 66791ff + 0084b15 commit 75dabd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/kit/shell/shellCommand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 75dabd0

Please sign in to comment.