diff lib-src/etags.c @ 72328:bf72b454a40d

(readline): Change position on %n and \" in sscanf.
author Jan Djärv <jan.h.d@swipnet.se>
date Wed, 09 Aug 2006 06:56:16 +0000
parents 1fb4cb2b0ce0
children 43638213c829
line wrap: on
line diff
--- a/lib-src/etags.c	Wed Aug 09 06:22:27 2006 +0000
+++ b/lib-src/etags.c	Wed Aug 09 06:56:16 2006 +0000
@@ -6259,9 +6259,10 @@
 	  int start, lno;
 
 	  if (DEBUG) start = 0;	/* shut up the compiler */
-	  if (sscanf (lbp->buffer, "#line %d \"%n", &lno, &start) >= 1)
+	  if (sscanf (lbp->buffer, "#line %d %n\"", &lno, &start) >= 1
+	      && inp[start] == '"')
 	    {
-	      char *endp = lbp->buffer + start;
+	      char *endp = lbp->buffer + ++start;
 
 	      assert (start > 0);
 	      while ((endp = etags_strchr (endp, '"')) != NULL