From: Mikko Rasa Date: Sun, 8 Jan 2017 11:59:57 +0000 (+0200) Subject: Guard against badly behaving get functions in getline X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=bd892a8afd93f849aec21706a009f69a5868b34d;p=libs%2Fcore.git Guard against badly behaving get functions in getline --- diff --git a/source/io/base.cpp b/source/io/base.cpp index da2b5a9..95a3685 100644 --- a/source/io/base.cpp +++ b/source/io/base.cpp @@ -31,7 +31,7 @@ bool Base::getline(string &line) if(eof_flag) return false; - while(1) + while(!eof()) { int c = get(); if(c==-1 || c=='\n')