diff options
Diffstat (limited to 'include/rapidjson/filereadstream.h')
-rw-r--r-- | include/rapidjson/filereadstream.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rapidjson/filereadstream.h b/include/rapidjson/filereadstream.h index f1bfb7d0..6b343707 100644 --- a/include/rapidjson/filereadstream.h +++ b/include/rapidjson/filereadstream.h @@ -59,7 +59,7 @@ public: // For encoding detection only. const Ch* Peek4() const { - return (current_ + 4 <= bufferLast_) ? current_ : 0; + return (current_ + 4 - !eof_ <= bufferLast_) ? current_ : 0; } private: |