From d82f35eda1fa028590e3dc591963289477e628e2 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Mon, 25 Mar 2002 20:56:20 +0000 Subject: [PATCH] __[x|]getmainargs: Accept NULL new_mode argument. --- dlls/msvcrt/data.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c index 1a4200870a1..256b0e9cfb1 100644 --- a/dlls/msvcrt/data.c +++ b/dlls/msvcrt/data.c @@ -253,7 +253,8 @@ void __getmainargs(int *argc, char** *argv, char** *envp, *argc = MSVCRT___argc; *argv = MSVCRT___argv; *envp = MSVCRT__environ; - MSVCRT__set_new_mode( *new_mode ); + if (new_mode) + MSVCRT__set_new_mode( *new_mode ); } /********************************************************************* @@ -266,7 +267,8 @@ void __wgetmainargs(int *argc, WCHAR** *wargv, WCHAR** *wenvp, *argc = MSVCRT___argc; *wargv = MSVCRT___wargv; *wenvp = MSVCRT__wenviron; - MSVCRT__set_new_mode( *new_mode ); + if (new_mode) + MSVCRT__set_new_mode( *new_mode ); } /*********************************************************************