diff options
Diffstat (limited to 'include.c')
-rw-r--r-- | include.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -273,12 +273,9 @@ find_full_inc_path(const char *file, const char *include, int type) * in the directory of the file being parsed. */ if ((type == INCLUDEDOT) || (type == INCLUDENEXTDOT)) { - const char *p; + const char *p = strrchr(file, '/'); - for (p = file + strlen(file); p > file; p--) - if (*p == '/') - break; - if (p == file) { + if ((p == NULL) || (p == file)) { strcpy(path, include); } else { |