[Issue#] N/A
[Problem] If arguments for "-c" is wrong, wrt-installer doesn't
exit
[Cause] During parsing command, wrt-installer cannot get out from
while loop
[Solution] Add condition for argument is wrong case
[SCMRequest] N/A
Change-Id: Id506bbce99f5559bdc3d5f08716eec304287a6e5
const char* ptr = strtok(buf,":");
while (ptr != NULL) {
std::string string = ptr;
+ ptr = strtok (NULL, ":");
size_t pos = string.find('=');
if (pos == std::string::npos) {
continue;
}
result.insert(
CSCConfiguration::dataPair(string.substr(0, pos),
- string.substr(pos+1)));
- ptr = strtok (NULL, ":");
+ string.substr(pos+1)));
}
return result;
}