Commit 626d091d authored by rswindell's avatar rswindell
Browse files

Fixed segfault in argv parsing.

parent 956c7138
......@@ -722,8 +722,10 @@ int main(int argc, char **argv)
return(1); } }
else if(argv[j][0]=='+') { /* filelist - FILES.BBS */
listgiven=1;
if(isdigit(argv[j+1][0])) { /* skip x characters before description */
if(isdigit(argv[j+2][0])) { /* skip x characters before size */
if(argc > j+1
&& isdigit(argv[j+1][0])) { /* skip x characters before description */
if(argc > j+2
&& isdigit(argv[j+2][0])) { /* skip x characters before size */
addlist(argv[j]+1,f,atoi(argv[j+1]),atoi(argv[j+2]));
j+=2; }
else {
......
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