From bd892a8afd93f849aec21706a009f69a5868b34d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 8 Jan 2017 13:59:57 +0200 Subject: [PATCH] Guard against badly behaving get functions in getline --- source/io/base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- 2.45.2