Commit 3e544b0f authored by Tom Tromey's avatar Tom Tromey Committed by Tom Tromey

Allocate two arguments for every argument in initial vector.

Thu Mar 19 18:21:45 1998  Tom Tromey  <tromey@cygnus.com>

	* mico-parse.cc (parse_mico_arg): Allocate two arguments for every
	argument in initial vector.
parent 0970bb6e
Thu Mar 19 18:21:45 1998 Tom Tromey <tromey@cygnus.com>
* mico-parse.cc (parse_mico_arg): Allocate two arguments for every
argument in initial vector.
Wed Mar 18 23:10:27 1998 George Lebl <jirka@5z.com>
* launcher.c: redid the way applets are initially read in
......
Thu Mar 19 18:21:45 1998 Tom Tromey <tromey@cygnus.com>
* mico-parse.cc (parse_mico_arg): Allocate two arguments for every
argument in initial vector.
Wed Mar 18 23:10:27 1998 George Lebl <jirka@5z.com>
* launcher.c: redid the way applets are initially read in
......
......@@ -79,8 +79,11 @@ parse_mico_arg (int key, char *arg, struct argp_state *state)
}
else if (key == ARGP_KEY_INIT)
{
/* Allocate enough space. */
our_mico_argv = (char **) malloc ((state->argc + 1) * sizeof (char *));
/* Allocate enough space. We allocate twice as much as you'd
think we need -- the user might write `--ORBId=FOO', but
we always expand that into two arguments: `--ORBId FOO'. */
our_mico_argv = (char **) malloc (2 * (state->argc + 1)
* sizeof (char *));
our_mico_argc = 0;
our_mico_argv[our_mico_argc++] = strdup (state->argv[0]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment