Program Question

Matt Porter plug-devel@lists.PLUG.phoenix.az.us
Mon Jan 6 17:06:02 2003


On Mon, Jan 06, 2003 at 04:11:55PM -0700, Bryce C wrote:
> Can anyone tell me why there is always a segfault at the end of this?

<snip>

> 	for(int i=1; i<= argc; i++)
                     ^^^^^^^^^
It's overrunning the argv array.

Should be:

 	for(int i=1; i< argc; i++)

Regards,
-- 
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.