Skip to content

Commit 176e819

Browse files
Vbox wrapper: if write shared/cmdline, don't end with \n
... it writes \r\n on Win. Also, just to make sure, open file "wb".
1 parent 7294138 commit 176e819

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

samples/vboxwrapper/vboxwrapper.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,14 +660,13 @@ int main(int argc, char** argv) {
660660
}
661661

662662
if (pVM->copy_cmdline_to_shared) {
663-
FILE* f = fopen("shared/cmdline", "w");
663+
FILE* f = fopen("shared/cmdline", "wb");
664664
if (!f) {
665665
vboxlog_msg("Couldn't create shared/cmdline");
666666
} else {
667667
for (int i=1; i<argc; i++) {
668668
fprintf(f, "%s ", argv[i]);
669669
}
670-
fprintf(f, "\n");
671670
fclose(f);
672671
}
673672
}

0 commit comments

Comments
 (0)