- } else if (!strstarts(path, debugpath)) {
- fprintf(stderr, "--debugpath not followed: %s\n", path);
- debugpath = NULL;
+ } else {
+ /* Ignore last character: could be upper or lower. */
+ path[strlen(path)-1] = '\0';
+ if (!strstarts(debugpath, path)) {
+ fprintf(stderr,
+ "--debugpath not followed: %s\n", path);
+ debugpath = NULL;
+ }