make somewhat safer

This commit is contained in:
ceriel 1988-09-01 10:07:02 +00:00
parent a40768b6f9
commit 615b67952f
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ static getline ()
static skip_period ()
{
while (*_buf != ':')
while (*_buf && *_buf != ':')
_buf++;
*_buf++ = '\0';
}

View file

@ -65,7 +65,7 @@ static getline ()
static skip_period ()
{
while (*_buf != ':')
while (*_buf && *_buf != ':')
_buf++;
*_buf++ = '\0';