Pass correct length to mbstowcs
Too used to sizeof being the right thing for regular strings.weechat-hashes
parent
2816c019a3
commit
77a7c02435
2
edit.c
2
edit.c
|
@ -143,7 +143,7 @@ static void tabComplete(uint id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
wchar_t wcs[Cap];
|
wchar_t wcs[Cap];
|
||||||
n = mbstowcs(wcs, comp, sizeof(wcs));
|
n = mbstowcs(wcs, comp, Cap);
|
||||||
assert(n != (size_t)-1);
|
assert(n != (size_t)-1);
|
||||||
if (tab.pos + n + 2 > Cap) {
|
if (tab.pos + n + 2 > Cap) {
|
||||||
completeReject();
|
completeReject();
|
||||||
|
|
Loading…
Reference in New Issue