]> git.eshelyaron.com Git - emacs.git/commitdiff
(readline): Change position on %n and \" in sscanf.
authorJan Djärv <jan.h.d@swipnet.se>
Wed, 9 Aug 2006 06:56:16 +0000 (06:56 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Wed, 9 Aug 2006 06:56:16 +0000 (06:56 +0000)
lib-src/ChangeLog
lib-src/etags.c

index 3e7d9efad318f90dca027ba618d6bfeaf8899a14..3328f0108465131dc73cc20deeca84eac700b6be 100644 (file)
@@ -1,6 +1,7 @@
 2006-08-09  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * etags.c (readline): expect sscanf returns >= 1.
+       (readline): Change position on %n and \" in sscanf.
 
 2006-08-07  Masatake YAMATO  <jet@gyve.org>
 
index c7d18d348494dc5d1ba7bc885c1e9fa56127fa52..b02268ac2186e86bef66875c1a8cf3addbcdd639 100644 (file)
@@ -6259,9 +6259,10 @@ readline (lbp, stream)
          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