+2005-07-16 Michael Schmitt <michael.schmitt@teststep.org>
+
+ * funcrequest.C (split): avoid reading uninitialized char c
+
2005-07-16 José Matos <jamatos@fc.up.pt>
* buffer.C:
}
-void split(vector<string> & args, string str)
+void split(vector<string> & args, string const & str)
{
istringstream is(str);
while (is) {
char c;
string s;
is >> c;
- if (c == '"')
- getline(is, s, '"');
- else {
- is.putback(c);
- is >> s;
+ if (is) {
+ if (c == '"')
+ getline(is, s, '"');
+ else {
+ is.putback(c);
+ is >> s;
+ }
+ args.push_back(s);
}
- args.push_back(s);
}
}