fix insert codepath for an annoying glibc
This commit is contained in:
parent
14edf4199d
commit
e1785c7699
1 changed files with 1 additions and 1 deletions
2
mew.c
2
mew.c
|
@ -419,7 +419,7 @@ insert(const char *str, ssize_t n)
|
|||
return;
|
||||
/* move existing text out of the way, insert new text, and update cursor */
|
||||
memmove(&text[cursor + n], &text[cursor], sizeof text - cursor - MAX(n, 0));
|
||||
if (n > 0)
|
||||
if (str)
|
||||
memcpy(&text[cursor], str, n);
|
||||
cursor += n;
|
||||
match();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue