i know this topic has been discussed so many times you probably want to kill me for bringing it again. I tried my best not to bother anyone but without success..
it's ok until it's third time coming over the line which sets last char in the array to zero. i have checked all the numbers and it's all in bounds. argc is 2 and i-last_arg is 1. commenting that one line makes it work without AV but i need the strings to be ended :(
Uh? what's wrong with that? you can use index for dereferencing a pointer.. or what do you mean? I know i shouldn't access the last element but how else do i get the zero in there?
To me it looks like this line: args[argc][i-last_arg]=0;
is referencing args as a 2-dimensional array args[][], but it's only a one dimensional array args[].
Maybe I'm wrong here, but I think that's your problem.