mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +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
Notes:
sideshowbarker
2024-07-17 20:32:32 +09:00
Author: https://github.com/Rummskartoffel
Commit: d2f99c200f
Pull-request: https://github.com/SerenityOS/serenity/pull/12030
Reviewed-by: https://github.com/awesomekling
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