mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 13:57:32 +00:00
Bug #4619. When at eof, get() was returning undefined character. Now returning 0.
This commit is contained in:
parent
0170e093e7
commit
da1f481b1e
@ -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;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user