OSDN Git Service

2005-01-11 Paolo Carlini <pcarlini@suse.de>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / bits / istream.tcc
index 876f626..1cb88ca 100644 (file)
@@ -707,7 +707,7 @@ namespace std
                    break;
                }
 
-             if (_M_gcount < __n)
+             if (traits_type::eq_int_type(__c, __eof))
                 __err |= ios_base::eofbit;
             }
           catch(...)
@@ -755,11 +755,9 @@ namespace std
                    break;
                }
 
-             if (_M_gcount == __n)
-               ;
-              else if (traits_type::eq_int_type(__c, __eof))
+              if (traits_type::eq_int_type(__c, __eof))
                 __err |= ios_base::eofbit;
-             else
+             else if (traits_type::eq_int_type(__c, __delim))
                {
                  ++_M_gcount;
                  __sb->sbumpc();