about summary refs log tree commit diff stats
path: root/050scenario.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 /050scenario.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 '050scenario.cc')
-rw-r--r--050scenario.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/050scenario.cc b/050scenario.cc
index 0a1c0f90..71dfa72d 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -270,7 +270,7 @@ void check_memory(const string& s) {
   set<long long int> locations_checked;
   while (true) {
     skip_whitespace_and_comments(in);
-    if (in.eof()) break;
+    if (!has_data(in)) break;
     string lhs = next_word(in);
     if (!is_integer(lhs)) {
       check_type(lhs, in);