Reserve space for current directory

This commit is contained in:
momo5502
2025-02-08 18:52:13 +01:00
parent 2da494a370
commit fe84448bf5
2 changed files with 14 additions and 8 deletions

View File

@@ -210,7 +210,7 @@ namespace
}
void setup_context(windows_emulator& win_emu, const emulator_settings& settings, const windows_path& application,
const windows_path& working_directory)
const windows_path& working_dir)
{
auto& emu = win_emu.emu();
auto& context = win_emu.process();
@@ -270,7 +270,7 @@ namespace
}
allocator.make_unicode_string(proc_params.CommandLine, command_line);
allocator.make_unicode_string(proc_params.CurrentDirectory.DosPath, working_directory.u16string() + u"\\");
allocator.make_unicode_string(proc_params.CurrentDirectory.DosPath, working_dir.u16string() + u"\\", 1024);
allocator.make_unicode_string(proc_params.ImagePathName, application_str);
const auto total_length = allocator.get_next_address() - context.process_params.value();