diff --git a/samples/vboxwrapper/vbox_common.cpp b/samples/vboxwrapper/vbox_common.cpp index 981a06a54b..3b4e89b75a 100644 --- a/samples/vboxwrapper/vbox_common.cpp +++ b/samples/vboxwrapper/vbox_common.cpp @@ -607,8 +607,7 @@ void VBOX_BASE::sanitize_output(std::string& output) { iter = output.begin(); while (iter != output.end()) { if (*iter == '%') { - iter = output.insert(iter, '%'); - ++iter; + iter = output.insert(iter+1, '%'); } else { ++iter; }