summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-10-23 18:51:12 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2003-10-23 18:51:12 -0700
commit21c7ee1e3ef10cc1ace8d6f29f41c18358b8c0f4 (patch)
tree94f50878065e9c616086add50d5e45cacbea4dd7
parent35a0764307c0537d514f3ee2ef34e6df79c1a76d (diff)
downloadgem5-21c7ee1e3ef10cc1ace8d6f29f41c18358b8c0f4.tar.xz
Print error message when we can't parse a .ini assignment line.
--HG-- extra : convert_revision : b7e19ff42ddd9a21571e086c11e143d9290e0e38
-rw-r--r--base/inifile.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/base/inifile.cc b/base/inifile.cc
index 7fd2f5568..6baf22850 100644
--- a/base/inifile.cc
+++ b/base/inifile.cc
@@ -217,8 +217,11 @@ bool
IniFile::Section::add(const std::string &assignment)
{
string::size_type offset = assignment.find('=');
- if (offset == string::npos) // no '=' found
+ if (offset == string::npos) {
+ // no '=' found
+ cerr << "Can't parse .ini line " << assignment << endl;
return false;
+ }
// if "+=" rather than just "=" then append value
bool append = (assignment[offset-1] == '+');