mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 19:53:56 +00:00
Fix current folder
This commit is contained in:
@@ -137,7 +137,7 @@ public:
|
||||
|
||||
result.Buffer = reinterpret_cast<PWCH>(string_buffer);
|
||||
result.Length = static_cast<USHORT>(total_length);
|
||||
result.MaximumLength = result.Length;
|
||||
result.MaximumLength = static_cast<USHORT>(total_length + element_size);
|
||||
}
|
||||
|
||||
emulator_object<UNICODE_STRING> make_unicode_string(const std::wstring_view str)
|
||||
|
||||
@@ -235,8 +235,10 @@ namespace
|
||||
command_line.append(arg);
|
||||
}
|
||||
|
||||
const auto current_folder = canonical(absolute(file).parent_path()).make_preferred().wstring() + L"\\";
|
||||
|
||||
allocator.make_unicode_string(proc_params.CommandLine, command_line);
|
||||
//gs.make_unicode_string(proc_params.CurrentDirectory.DosPath, file.parent_path().wstring());
|
||||
allocator.make_unicode_string(proc_params.CurrentDirectory.DosPath, current_folder);
|
||||
allocator.make_unicode_string(proc_params.ImagePathName, file.wstring());
|
||||
|
||||
const auto total_length = allocator.get_next_address() - context.process_params.value();
|
||||
|
||||
Reference in New Issue
Block a user