diff --git a/reactos/tools/sysreg/os_support.cpp b/reactos/tools/sysreg/os_support.cpp index fea82c84232..7b43de42dad 100644 --- a/reactos/tools/sysreg/os_support.cpp +++ b/reactos/tools/sysreg/os_support.cpp @@ -42,7 +42,7 @@ namespace System_ if (procargsnum) { - for (int i = 0; i < procargsnum; i++) + for (int i = 1; i < procargsnum; i++) { length += _tcslen(procargs[i]); } @@ -50,7 +50,7 @@ namespace System_ length += procargsnum; szBuffer = (TCHAR*)malloc(length * sizeof(TCHAR)); length = 0; - for (int i = 0; i < procargsnum; i++) + for (int i = 1; i < procargsnum; i++) { _tcscpy(&szBuffer[length], procargs[i]); length += _tcslen(procargs[i]); diff --git a/reactos/tools/sysreg/rosboot_test.cpp b/reactos/tools/sysreg/rosboot_test.cpp index 3fdf05911bf..491c3ab5bf2 100644 --- a/reactos/tools/sysreg/rosboot_test.cpp +++ b/reactos/tools/sysreg/rosboot_test.cpp @@ -148,22 +148,23 @@ namespace Sysreg_ qemuimgdir += _T("\\qemu-img.exe"); #endif - TCHAR * options[] = { + if (!isFileExisting(qemuimgdir)) + { + cerr << "Error: ROS_EMU_PATH must contain the path to qemu and qemu-img" << endl; + return false; + } + + TCHAR * options[] = { NULL, _T("create"), NULL, _T("100M"), NULL }; - if (!isFileExisting(qemuimgdir)) - { - cerr << "Error: ROS_EMU_PATH must contain the path to qemu and qemu-img" << endl; - return false; - } - getDefaultHDDImage(output); - options[1] = (TCHAR*)output.c_str(); + options[0] = (TCHAR*)qemuimgdir.c_str(); + options[2] = (TCHAR*)output.c_str(); cerr << "Creating HDD Image ..." << output << endl; if (OsSupport::createProcess ((TCHAR*)qemuimgdir.c_str(), 3, options, true))