diff options
author | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-14 07:15:37 +0000 |
---|---|---|
committer | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-14 07:15:37 +0000 |
commit | 7ebd7605a5cff87fb20bea9cd3d7a59ea261060f (patch) | |
tree | 1aa52b6d9d5b8f647484ca449adfe01e5b112c49 /gcc/diagnostic.c | |
parent | 700b0d81d235a049d7f5a674290d3d6d760e5319 (diff) | |
download | gcc-7ebd7605a5cff87fb20bea9cd3d7a59ea261060f.tar.gz |
PR other/17900
* diagnostic.c (trim_filename): Fix logic bug in walking backwards
up the filename looking for a previous directory separator.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89029 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r-- | gcc/diagnostic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 0705c638600..c25c0ec5472 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -366,7 +366,7 @@ trim_filename (const char *name) p++, q++; /* Now go backwards until the previous directory separator. */ - while (p > name && IS_DIR_SEPARATOR (p[-1])) + while (p > name && !IS_DIR_SEPARATOR (p[-1])) p--; return p; |