From af6718c8f1558ff16954ff7e6808fc5f0bcf9428 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sat, 28 Mar 2009 23:38:50 +0100 Subject: [PATCH] Fixed a bug with getline() failing at the EOF. --- selector.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/selector.cc b/selector.cc index f5b9d2d..3f8aba7 100644 --- a/selector.cc +++ b/selector.cc @@ -544,14 +544,14 @@ int main(int argc, char **argv) { file.getline(raw_line, buffer_size); - if(file.fail()) { - cerr << "Line too long." << endl; - cerr << raw_line << endl; - exit(1); - } - if(raw_line[0]) { + if(file.fail()) { + cerr << "Line too long:" << endl; + cerr << raw_line << endl; + exit(1); + } + char *s, *t; const char *u; -- 2.39.5