* <HEADER>: <fileID>
*/
for (i = 0; i < VIMSPELLMAGICL; ++i)
- buf[i] = c = getc(fd); // <fileID>
+ buf[i] = (c = getc(fd)) == EOF ? 0 : c; // <fileID>
if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0)
{
emsg(_(e_this_does_not_look_like_spell_file));
* <SUGHEADER>: <fileID> <versionnr> <timestamp>
*/
for (i = 0; i < VIMSUGMAGICL; ++i)
- buf[i] = c = getc(fd); // <fileID>
+ buf[i] = (c = getc(fd)) == EOF ? 0 : c; // <fileID>
if (STRNCMP(buf, VIMSUGMAGIC, VIMSUGMAGICL) != 0)
{
semsg(_(e_this_does_not_look_like_sug_file_str),