mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-30 18:47:01 +00:00
parent
ac628b106b
commit
b45571e9d0
@ -47,7 +47,7 @@ void init_config_args(void)
|
||||
if (argc == 0)
|
||||
return;
|
||||
|
||||
argv = (char**)env()->heap()->alloc(argc * sizeof(char*));
|
||||
argv = (char**)env()->heap()->alloc((argc + 1) * sizeof(char*));
|
||||
|
||||
/* read the arguments */
|
||||
Xml_node arg_node = config()->xml_node().sub_node("arg");
|
||||
@ -62,6 +62,8 @@ void init_config_args(void)
|
||||
}
|
||||
} catch (Xml_node::Nonexistent_sub_node) { }
|
||||
|
||||
argv[argc] = 0;
|
||||
|
||||
/* register command-line arguments at Genode's startup code */
|
||||
genode_argc = argc;
|
||||
genode_argv = argv;
|
||||
|
Loading…
Reference in New Issue
Block a user