summaryrefslogtreecommitdiffhomepage
path: root/src/argv
diff options
context:
space:
mode:
Diffstat (limited to 'src/argv')
-rw-r--r--src/argv/ntapi_tt_argv_envp.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/argv/ntapi_tt_argv_envp.c b/src/argv/ntapi_tt_argv_envp.c
index 520254d..1c20cfc 100644
--- a/src/argv/ntapi_tt_argv_envp.c
+++ b/src/argv/ntapi_tt_argv_envp.c
@@ -696,16 +696,11 @@ int32_t __stdcall __ntapi_tt_get_argv_envp_utf8(
wchar16_t * __stdcall __ntapi_tt_get_cmd_line_utf16(void)
{
- nt_peb * peb;
- nt_unicode_string cmd_line;
-
- peb = (nt_peb *)pe_get_peb_address();
+ nt_peb * peb;
- if (peb) {
- cmd_line = peb->process_params->command_line;
- return cmd_line.buffer;
- } else
- return (wchar16_t *)0;
+ return (peb = (nt_peb *)pe_get_peb_address())
+ ? peb->process_params->command_line.buffer
+ : 0;
}