summaryrefslogtreecommitdiff
path: root/src/spellfile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-09-01 19:56:15 +0200
committerBram Moolenaar <Bram@vim.org>2020-09-01 19:56:15 +0200
commit9c2b06637b32742cac11bfd66b1a4e84583c6c2e (patch)
tree6f193fe923afd59dd8ac369bd58e9ae32fc06ae2 /src/spellfile.c
parentca563b9b948aec18463c26e9f87ae7933571b40e (diff)
downloadvim-git-9c2b06637b32742cac11bfd66b1a4e84583c6c2e.tar.gz
patch 8.2.1560: using NULL pointers in some codev8.2.1560
Problem: Using NULL pointers in some code. (James McCoy) Solution: Avoid adding to a NULL pointer. Use byte as unsigned.
Diffstat (limited to 'src/spellfile.c')
-rw-r--r--src/spellfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spellfile.c b/src/spellfile.c
index 6aeac86b8..d5ec3fead 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -816,7 +816,7 @@ read_cnt_string(FILE *fd, int cnt_bytes, int *cntp)
// read the length bytes, MSB first
for (i = 0; i < cnt_bytes; ++i)
- cnt = (cnt << 8) + getc(fd);
+ cnt = (cnt << 8) + (unsigned)getc(fd);
if (cnt < 0)
{
*cntp = SP_TRUNCERROR;