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

git-svn-id: svn://10.0.0.236/trunk@26814 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mcmullen%netscape.com 1999-04-08 17:31:00 +00:00
parent 2b056a5512
commit 49fc082db3
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;
}
//----------------------------------------------------------------------------------------