Commit 47130a02 authored by Artur Wojcik's avatar Artur Wojcik
Browse files

fix const cast strncpy() source argument

parent 64199a0f
...@@ -218,10 +218,10 @@ int exec(const std::pair<std::string, std::string>& command, F f) ...@@ -218,10 +218,10 @@ int exec(const std::pair<std::string, std::string>& command, F f)
info.hStdInput = input.get_read_handle(); info.hStdInput = input.get_read_handle();
info.dwFlags |= STARTF_USESTDHANDLES; info.dwFlags |= STARTF_USESTDHANDLES;
ZeroMemory(&process_info, sizeof(process_info)); TCHAR cmdline[MAX_PATH];
std::strncpy(const_cast<TCHAR *>(cmd.c_str()), cmdline, MAX_PATH);
TCHAR cmdline[MAX_PATH]; ZeroMemory(&process_info, sizeof(process_info));
std::strncpy(cmd.c_str(), cmdline, MAX_PATH);
if(CreateProcess(nullptr, if(CreateProcess(nullptr,
cmdline, cmdline,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment