diff --git a/vlib/os/os_windows.c.v b/vlib/os/os_windows.c.v index caf8141da1..c7738cdad6 100644 --- a/vlib/os/os_windows.c.v +++ b/vlib/os/os_windows.c.v @@ -95,9 +95,9 @@ struct C._utimbuf { fn C._utime(&char, voidptr) int fn init_os_args_wide(argc int, argv &&byte) []string { - mut args_ := []string{} + mut args_ := []string{len: argc} for i in 0 .. argc { - args_ << unsafe { string_from_wide(&u16(argv[i])) } + args_[i] = unsafe { string_from_wide(&u16(argv[i])) } } return args_ } diff --git a/vlib/v/tests/valgrind/valgrind_test.v b/vlib/v/tests/valgrind/valgrind_test.v index fcbc1494b1..227df9b332 100644 --- a/vlib/v/tests/valgrind/valgrind_test.v +++ b/vlib/v/tests/valgrind/valgrind_test.v @@ -29,7 +29,6 @@ const skip_valgrind_files = [ 'vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.v', 'vlib/v/tests/valgrind/option_simple.v', 'vlib/v/tests/valgrind/string_plus_string_plus.v', - 'vlib/v/tests/valgrind/import_os_and_use_its_constants.v', ] fn vprintln(s string) {