make somewhat safer

This commit is contained in:
ceriel 1988-09-01 10:07:02 +00:00
parent ad172c3e1f
commit 806e8160f0
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';