aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spellfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/spellfile.c')
-rw-r--r--src/nvim/spellfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c
index 97a82582c0..8756bee21c 100644
--- a/src/nvim/spellfile.c
+++ b/src/nvim/spellfile.c
@@ -1157,8 +1157,8 @@ static int read_sal_section(FILE *fd, slang_T *slang)
if (i < ccnt)
// store the char we got while checking for end of sm_lead
*p++ = c;
- for (++i; i < ccnt; ++i)
- *p++ = getc(fd); // <salfrom>
+ SPELL_READ_NONNUL_BYTES((char *)p, (size_t)ccnt, fd); // <salfrom>
+ p += ccnt;
*p++ = NUL;
// <saltolen> <salto>