Bug #4619. When at eof, get() was returning undefined character. Now returning 0.

This commit is contained in:
mcmullen%netscape.com 1999-04-08 17:31:00 +00:00
parent 0170e093e7
commit da1f481b1e
2 changed files with 6 additions and 4 deletions

View File

@ -43,8 +43,9 @@ char nsInputStream::get()
//----------------------------------------------------------------------------------------
{
char c;
read(&c, sizeof(c));
return c;
if (read(&c, sizeof(c)) == sizeof(c))
return c;
return 0;
}
//----------------------------------------------------------------------------------------

View File

@ -43,8 +43,9 @@ char nsInputStream::get()
//----------------------------------------------------------------------------------------
{
char c;
read(&c, sizeof(c));
return c;
if (read(&c, sizeof(c)) == sizeof(c))
return c;
return 0;
}
//----------------------------------------------------------------------------------------