(readline): Change position on %n and \" in sscanf.
This commit is contained in:
parent
1f4edc37b8
commit
ea90c5d3bd
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue