Fix a bug in boost that doesn't let us read 0 byte files from gzip streams

Bug #16544
This commit is contained in:
Jon Daniel 2012-05-02 12:57:10 +00:00
parent 3277f00658
commit 14ab49ccd9

View file

@ -18,7 +18,7 @@
#define TOKENIZER_H_INCLUDED
#include "buffered_istream.hpp"
#include <boost/iostreams/filter/gzip.hpp>
#include <istream>
#include <string>
@ -105,7 +105,11 @@ private:
void next_char_fast()
{
do {
current_ = in_.get();
try {
current_ = in_.get();
} catch(boost::iostreams::gzip_error e) {
current_ = EOF;
}
} while (UNLIKELY(current_ == '\r'));
#if 0
/// @todo disabled untill campaign server is fixed