summaryrefslogtreecommitdiffstats
path: root/src/spellfile.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/spellfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spellfile.c b/src/spellfile.c
index 24df042..51261ab 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -5877,7 +5877,7 @@ sug_write(spellinfo_T *spin, char_u *fname)
{
// <sugline>: <sugnr> ... NUL
line = ml_get_buf(spin->si_spellbuf, lnum, FALSE);
- len = (int)STRLEN(line) + 1;
+ len = ml_get_buf_len(spin->si_spellbuf, lnum) + 1;
if (fwrite(line, (size_t)len, (size_t)1, fd) == 0)
{
emsg(_(e_error_while_writing));