diff --git a/src/complete.c b/src/complete.c index 64e97f5..3ff11d1 100644 --- a/src/complete.c +++ b/src/complete.c @@ -125,12 +125,11 @@ static int SplitPath(char *path, char **dirpart, char **filepart) free(dpart); return -1; } - } - else { + } else { if ((dpart = strdup(path)) == NULL) return -1; dpart[fpart - path + 1] = '\0'; - if ((fpart = strdup(++fpart)) == NULL) { + if ((fpart = strdup(fpart + 1)) == NULL) { free(dpart); return -1; }