mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-02 03:52:13 +03:00
vere: copy argv[0] before calling dirname()
This commit is contained in:
parent
a9233493d3
commit
c70e8ed167
@ -361,7 +361,9 @@ _main_getopt(c3_i argc, c3_c** argv)
|
||||
if ( (U3_BIN_ALIAS_LEN <= len_w)
|
||||
&& (0 == strcmp(argv[0] + (len_w - U3_BIN_ALIAS_LEN), U3_BIN_ALIAS)) )
|
||||
{
|
||||
u3_Host.dir_c = _main_repath(dirname(argv[0]));
|
||||
c3_c* bin_c = strdup(argv[0]);
|
||||
u3_Host.dir_c = _main_repath(dirname(bin_c));
|
||||
c3_free(bin_c);
|
||||
}
|
||||
// no args, invalid command
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user