* sim/ucsim/cmd.src/cmdutil.cc: NUL device is detected as CG_FILE type
[fw/sdcc] / src / SDCCdwarf2.c
index f02f379533a28eb54fe4c4e246301062eb4f9bdb..0e1d1c325a698d79d6851b9ae5b38fb96af92892 100644 (file)
@@ -1575,7 +1575,7 @@ dwFindFileIndex (char * filename)
       if (!strncmp (includeDir, filename, strlen (includeDir))
           && strlen (filename) > strlen (includeDir))
         {
-         if (*(filename+strlen (includeDir)) == DIR_SEPARATOR_CHAR)
+         if (IS_DIR_SEPARATOR(filename[strlen (includeDir)]))
            break;
        }
     }