Add null check to feof.
Co-authored-by: Jack Grigg <jack@z.cash> Co-authored-by: Ying Tong Lai <yingtong@electriccoin.co> Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
b941974363
commit
868691020e
|
@ -566,7 +566,7 @@ public:
|
|||
|
||||
// check whether we're at the end of the source file
|
||||
bool eof() const {
|
||||
return nReadPos == nSrcPos && feof(src);
|
||||
return src == NULL || (nReadPos == nSrcPos && feof(src));
|
||||
}
|
||||
|
||||
// read a number of bytes
|
||||
|
|
Loading…
Reference in New Issue