Tom Koelman wrote:
Hi,

Under MiNGQ _gnu_process_args crashes when argv is 0. This patch fixes
this and sets the executable to the empty string when this happens.

Wow. How often does this happen? It seems pretty strange to me.

@@ -191,10 +200,15 @@ _gnu_process_args(int argc, char *argv[]
{
NSMutableSet *mySet;
id obj_argv[argc];
- int added = 0;
+ int added = 1;
mySet = [NSMutableSet new];
- for (i = 0; i < argc; i++) +
+ /* Copy the zero'th argument to the argument list */
+ NSString *str = [NSString stringWithCString: _gnu_arg_zero];
+ obj_argv[0] = str;
+ + for (i = 1; i < argc; i++) {
NSString *str = [NSString stringWithCString: argv[i]];
The documentation for the -arguments method is a little ambiguous. Is it supposed to include arg 0 or not?



_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to