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:
computezrmle 2022-11-03 14:08:03 +01:00 committed by GitHub
parent 213028bb95
commit 9d74013b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -605,9 +605,7 @@ namespace vboxmanage {
//
type_line = output;
transform(type_line.cbegin(), type_line.cend(),
type_line.begin(), [](unsigned char c) { return tolower(c); });
type_start = type_line.find("\ntype: ") + 1;
type_start = type_line.find("\nType: ") + 1;
type_end = type_line.find("\n", type_start) - type_start;
type_line = type_line.substr(type_start, type_end);