From: Nathan Binkert Date: Tue, 17 Aug 2004 15:19:04 +0000 (-0400) Subject: Fix a small bug in parameter processing that would always result X-Git-Tag: m5_1.0_tutorial~191 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=239183cfe675684aeca1a2b24362ca5e0a82809d;p=gem5.git Fix a small bug in parameter processing that would always result in at least on entry in a VectorParam even if the string was empty. sim/param.cc: if there are no parameters, leave the vector empty. --HG-- extra : convert_revision : d0d41baa8c77651a27ac6a4d02cc388711f47dbe --- diff --git a/sim/param.cc b/sim/param.cc index 4f9d0a577..84ecbf8f9 100644 --- a/sim/param.cc +++ b/sim/param.cc @@ -211,6 +211,11 @@ template void VectorParam::parse(const string &s) { + if (s.empty()) { + wasSet = true; + return; + } + vector tokens; tokenize(tokens, s, ' ');