]> www.ginac.de Git - cln.git/blobdiff - src/base/string/input/cl_st_get2.cc
Fix compilation with GCC 4.4.
[cln.git] / src / base / string / input / cl_st_get2.cc
index d89f3e427cef87524e7a6446dab1e69e2e7a5e26..52b0afc2afb0fb8876ea5be409ee14347e073f7d 100644 (file)
@@ -17,11 +17,11 @@ namespace cln {
 const cl_string cl_fget (std::istream& stream, int n, char delim)
 {
        var cl_spushstring buffer;
-       // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.get()==EOF).
+       // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.eof()).
        while (stream.good()) {
                var int c = stream.get();
-               if (c==EOF)
-                       break;  // ios::eofbit already set
+               if (stream.eof())
+                       break;
                if (c==delim) {
                        stream.unget();
                        break;