Commit ea90c5d3 authored by Jan Djärv's avatar Jan Djärv

(readline): Change position on %n and \" in sscanf.

parent 1f4edc37
2006-08-09 Jan Dj,Ad(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>
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment