https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291374
Simon Wollwage <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |om --- Comment #3 from Simon Wollwage <[email protected]> --- (In reply to Jose Luis Duran from comment #2) I think I found the issue. It's in this part: else if (oli[2] == ':') /* * GNU Extension, for optional arguments if the rest of * the argument is empty, we return NULL */ optarg = NULL; So, if place is NULL (because of the space), it just sets the arg to NULL. Next iteration it would see just the 14 as an option and fails. Changing it to something like this should fix it: else if (oli[2] == ':') { /* * GNU Extension, for optional arguments if the rest of * the argument is empty, we return NULL */ if (nargc > optind + 1 && nargv[optind + 1][0] != '-') { optarg = nargv[++optind]; } else { optarg = NULL; } } But I am new to this and am not sure how to compile the stdlib part and test it. If I could get some guidance on that part I would be happy to make my first contribution. -- You are receiving this mail because: You are the assignee for the bug.
