mirror of https://github.com/BOINC/boinc.git
Avoid character conversion
Avoid possibly unsafe character conversion 'tolower'. Instead, rely on the output of vboxmanage. Should be fine as long as the virtualbox developers keep their outputs stable. If not, all tests against their messages would need a revision.
This commit is contained in:
parent
213028bb95
commit
9d74013b2a
|
@ -605,9 +605,7 @@ namespace vboxmanage {
|
||||||
//
|
//
|
||||||
|
|
||||||
type_line = output;
|
type_line = output;
|
||||||
transform(type_line.cbegin(), type_line.cend(),
|
type_start = type_line.find("\nType: ") + 1;
|
||||||
type_line.begin(), [](unsigned char c) { return tolower(c); });
|
|
||||||
type_start = type_line.find("\ntype: ") + 1;
|
|
||||||
type_end = type_line.find("\n", type_start) - type_start;
|
type_end = type_line.find("\n", type_start) - type_start;
|
||||||
type_line = type_line.substr(type_start, type_end);
|
type_line = type_line.substr(type_start, type_end);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue