summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/param.cc5
-rw-r--r--sim/serialize.cc6
2 files changed, 6 insertions, 5 deletions
diff --git a/sim/param.cc b/sim/param.cc
index d16578a2d..ff023ce85 100644
--- a/sim/param.cc
+++ b/sim/param.cc
@@ -441,6 +441,11 @@ EnumVectorParam<Map>::parse(const string &s)
{
vector<string> tokens;
+ if (s.empty()) {
+ wasSet = true;
+ return;
+ }
+
tokenize(tokens, s, ' ');
value.resize(tokens.size());
diff --git a/sim/serialize.cc b/sim/serialize.cc
index 3a073f68d..d5f217e55 100644
--- a/sim/serialize.cc
+++ b/sim/serialize.cc
@@ -333,11 +333,7 @@ SerializeParamContext::~SerializeParamContext()
void
SerializeParamContext::checkParams()
{
- if (serialize_dir.isValid()) {
- checkpointDirBase = serialize_dir;
- } else {
- checkpointDirBase = outputDirectory + "cpt.%012d";
- }
+ checkpointDirBase = outputDirectory + (string)serialize_dir;
// guarantee that directory ends with a '/'
if (checkpointDirBase[checkpointDirBase.size() - 1] != '/')