- VBOX: Clean up version string.

This commit is contained in:
Rom Walton 2012-12-28 19:16:10 -05:00 committed by Oliver Bock
parent 78ed97fd84
commit f57f32fd0b
2 changed files with 18 additions and 0 deletions

View File

@ -7960,3 +7960,9 @@ Rom 28 Dec 2012
samples\vboxwrapper\
vbox.cpp
Rom 28 Dec 2012
- VBOX: Clean up version string.
samples\vboxwrapper\
vbox.cpp

View File

@ -215,6 +215,18 @@ int VBOX_VM::initialize() {
command = "--version ";
vbm_popen(command, output, "version check");
#ifdef _WIN32
// Remove \r or \n from the output spew
string::iterator iter = output.begin();
while (iter != output.end()) {
if (*iter == '\r' || *iter == '\n') {
iter = output.erase(iter);
} else {
++iter;
}
}
#endif
virtualbox_version = "VirtualBox " + output;
return 0;