File::getc should return -1 (EOF) on failure.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Fri, 26 Aug 2011 10:38:36 +0000 (11:38 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Fri, 26 Aug 2011 10:38:36 +0000 (11:38 +0100)
trace_file.hpp

index a8b3345..5a98f60 100644 (file)
@@ -130,7 +130,7 @@ inline void File::flush(void)
 inline int File::getc()
 {
     if (!m_isOpened || m_mode != File::Read) {
-        return 0;
+        return -1;
     }
     return rawGetc();
 }