if (len > MAXREGIONS * 2)
return SP_FORMERROR;
for (i = 0; i < len; ++i)
- lp->sl_regions[i] = c = getc(fd); // <regionname>
+ lp->sl_regions[i] = (c = getc(fd)) == EOF ? 0 : c; // <regionname>
lp->sl_regions[len] = NUL;
return c == EOF ? SP_TRUNCERROR : 0;
}
buf[0] = '^'; // always match at one position only
p = buf + 1;
while (n-- > 0)
- *p++ = c = getc(fd); // <condstr>
+ *p++ = (c = getc(fd)) == EOF ? 0 : c; // <condstr>
if (c == EOF)
break;
*p = NUL;
// store the char we got while checking for end of sm_lead
*p++ = c;
for (++i; i < ccnt; ++i)
- *p++ = c = getc(fd); // <salfrom>
+ *p++ = (c = getc(fd)) == EOF ? 0 : c; // <salfrom>
*p++ = NUL;
// <saltolen> <salto>