mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
UserspaceEmulator: Fix execve messing up command lines with "--"
Emulator::virt$execve would construct command lines such as `/bin/UserspaceEmulator echo -- hello` instead of `/bin/UserspaceEmulator -- echo hello`, which naturally caused problems. This commit moves the "--" to the correct place.
This commit is contained in:
parent
2cda579b07
commit
d2f99c200f
1 changed files with 1 additions and 1 deletions
|
@ -1229,10 +1229,10 @@ int Emulator::virt$execve(FlatPtr params_addr)
|
|||
Vector<char*> envp;
|
||||
|
||||
argv.append(const_cast<char*>("/bin/UserspaceEmulator"));
|
||||
argv.append(const_cast<char*>(path.characters()));
|
||||
if (g_report_to_debug)
|
||||
argv.append(const_cast<char*>("--report-to-debug"));
|
||||
argv.append(const_cast<char*>("--"));
|
||||
argv.append(const_cast<char*>(path.characters()));
|
||||
|
||||
auto create_string_vector = [](auto& output_vector, auto& input_vector) {
|
||||
for (auto& string : input_vector)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue