aboutsummaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-02-12 23:45:20 +0000
committerJeff Law <law@gcc.gnu.org>1998-02-12 16:45:20 -0700
commit5e0e0f036a20508d674c8e17df4c6855e267d514 (patch)
tree02dcd6fb4adfc86a2707fe70739a35e7bd42a767 /gcc/cccp.c
parent2aca5b9b2d146953f3216f94f7abb754bf992a6a (diff)
downloadgcc-5e0e0f036a20508d674c8e17df4c6855e267d514.zip
gcc-5e0e0f036a20508d674c8e17df4c6855e267d514.tar.gz
gcc-5e0e0f036a20508d674c8e17df4c6855e267d514.tar.bz2
* cccp.c (new_include_prefix): Correctly handle -I./.
From-SVN: r17886
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index c394ea2..f8877be 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -9814,7 +9814,7 @@ new_include_prefix (prev_file_name, component, prefix, name)
len = simplify_filename (dir->fname);
/* Convert directory name to a prefix. */
- if (dir->fname[len - 1] != DIR_SEPARATOR) {
+ if (len && dir->fname[len - 1] != DIR_SEPARATOR) {
if (len == 1 && dir->fname[len - 1] == '.')
len = 0;
else