From 08cf048f2a8ed0fa096f2c82e147b61ffc480e2a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 17 Nov 2015 01:21:00 -0800 Subject: 2454 Another gotcha uncovered in the process of sorting out the previous commit: I keep using eof() but forgetting that there are two other states an istream can get into. Just never use eof(). --- 054dilated_reagent.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '054dilated_reagent.cc') diff --git a/054dilated_reagent.cc b/054dilated_reagent.cc index f1d3b267..ac40f049 100644 --- a/054dilated_reagent.cc +++ b/054dilated_reagent.cc @@ -80,7 +80,7 @@ if (s.at(0) == '{') { istringstream in(s); in >> std::noskipws; in.get(); // skip '{' - while (!in.eof()) { + while (has_data(in)) { string key = slurp_key(in); if (key.empty()) continue; if (key == "}") continue; -- cgit 1.4.1-2-gfad0