]> git.donarmstrong.com Git - mothur.git/blobdiff - mothurout.cpp
1.19.0
[mothur.git] / mothurout.cpp
index 2b06799f3c91f58c3c72ed63c2a6098d0473675e..c2ef698db8ed4d9c0769fcd4295a27a886c65bfc 100644 (file)
@@ -438,12 +438,12 @@ string MothurOut::getline(ifstream& fileHandle) {
        
                string line = "";
                
-               while (!fileHandle.eof())       {
+               while (fileHandle)      {
                        //get next character
                        char c = fileHandle.get(); 
                        
                        //are you at the end of the line
-                       if ((c == '\n') || (c == '\r') || (c == '\f')){  break; }       
+                       if ((c == '\n') || (c == '\r') || (c == '\f') || (c == EOF)){  break;   }       
                        else {          line += c;              }
                }