about summary refs log tree commit diff stats
path: root/054dilated_reagent.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-17 01:21:00 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-17 01:21:00 -0800
commit08cf048f2a8ed0fa096f2c82e147b61ffc480e2a (patch)
tree80493ca241c9172e21df76cedb98312af6de8113 /054dilated_reagent.cc
parent21c277062ef151ad86e2003ad0e2bfb09f3d4c2d (diff)
downloadmu-08cf048f2a8ed0fa096f2c82e147b61ffc480e2a.tar.gz
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().
Diffstat (limited to '054dilated_reagent.cc')
-rw-r--r--054dilated_reagent.cc2
1 files changed, 1 insertions, 1 deletions
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;