Fixes an error when reading `empty' cache files.
It uses the basic idea of 2008-12-27T17:26:06Z!kailoran@gmail.com, but the test added there doesn't seem to catch all cases. Fixes bug #16544.
This commit is contained in:
parent
db83c6de70
commit
90f4640884
2 changed files with 10 additions and 0 deletions
|
@ -270,6 +270,7 @@ Version 1.11.0-svn:
|
|||
added to game description
|
||||
* Fixed bug #19322: Empty sides not being listed at the status table
|
||||
* Fixed bug #19681: Use the created cache instead of rebuilding it all the time
|
||||
* Fixed bug #16544: Fail to read `empty' cache files.
|
||||
* Fix bug #19681: Cache is never valid
|
||||
|
||||
Version 1.10.0:
|
||||
|
|
|
@ -391,6 +391,15 @@ void read_gz(config &cfg, std::istream &file, abstract_validator * validator)
|
|||
filter.push(boost::iostreams::gzip_decompressor());
|
||||
filter.push(file);
|
||||
|
||||
/*
|
||||
* It sometimes seems the file is not empty but still no real data.
|
||||
* Filter that case here. It might be previous test is no longer required
|
||||
* but simply keep it.
|
||||
*/
|
||||
if(filter.peek() == EOF) {
|
||||
return;
|
||||
}
|
||||
|
||||
parser(cfg, filter,validator)();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue