Please sign in to comment.
wrapper: account for -l when checking argc
If "-l" is the first argument, record the fact in a variable and adjust argv and argc as if had not been present. This lets the existing "minimum arguments" check to handle the case where "-l" is the only argument. Previously, if "-l" was the only argument, we would end up with a segmentation fault from accidentally doing strlen(argv[argc]) (i.e. strlen(NULL)) in the dash-prefixing code. Reported as item #2 here: #13
- Loading branch information...