Fix list parsing.
This commit is contained in:
parent
80bfbf6f21
commit
47bf2830d8
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ std::vector<std::string> cmd_parse_list(const std::string list) {
|
||||||
std::vector<std::string> ret;
|
std::vector<std::string> ret;
|
||||||
std::string::size_type lastPos = 0;
|
std::string::size_type lastPos = 0;
|
||||||
std::string::size_type pos = 0;
|
std::string::size_type pos = 0;
|
||||||
while((pos = list.find(',')) != std::string::npos) {
|
while((pos = list.find(',', lastPos)) != std::string::npos) {
|
||||||
ret.push_back(list.substr(lastPos, pos - lastPos));
|
ret.push_back(list.substr(lastPos, pos - lastPos));
|
||||||
lastPos = pos + 1;
|
lastPos = pos + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue