diff --git a/checkin_notes b/checkin_notes index 88c8560a10..4e9e5e6820 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 9a63485983..3ea8585f7c 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -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;