This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix PR 17900


A one byte patch, committed as obvious.

Ben

2004-10-14  Ben Elliston  <bje@au.ibm.com>

	* diagnostic.c (trim_filename): Fix logic bug in walking backwards
	up the filename looking for a previous directory separator.

Index: diagnostic.c
===================================================================
RCS file: /home/bje/gcc-cvs/gcc/gcc/diagnostic.c,v
retrieving revision 1.143
diff -u -p -r1.143 diagnostic.c
--- diagnostic.c        6 Oct 2004 04:47:26 -0000       1.143
+++ diagnostic.c        14 Oct 2004 07:03:50 -0000
@@ -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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]