diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-09-09 12:25:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-09-09 12:25:33 +0200 |
commit | 14993322b1bdcd507f439fbbf6dd3d051f777373 (patch) | |
tree | b8a8b6f28d4530eae40167b2bc79dbe6c2964a04 /src/os_win32.c | |
parent | 120f4a878f61d78b9be34e3516aa4cdf0fc682d7 (diff) | |
download | vim-git-14993322b1bdcd507f439fbbf6dd3d051f777373.tar.gz |
updated for version 7.4.432v7.4.432
Problem: When the startup code expands command line arguments, setting
'encoding' will not properly convert the arguments.
Solution: Call get_cmd_argsW() early in main(). (Yasuhiro Matsumoto)
Diffstat (limited to 'src/os_win32.c')
-rw-r--r-- | src/os_win32.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index dd5714158..7192c51a0 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -6461,6 +6461,7 @@ get_cmd_argsW(char ***argvp) int argc = 0; int i; + free_cmd_argsW(); ArglistW = CommandLineToArgvW(GetCommandLineW(), &nArgsW); if (ArglistW != NULL) { @@ -6493,7 +6494,11 @@ get_cmd_argsW(char ***argvp) global_argc = argc; global_argv = argv; if (argc > 0) + { + if (used_file_indexes != NULL) + free(used_file_indexes); used_file_indexes = malloc(argc * sizeof(int)); + } if (argvp != NULL) *argvp = argv; |