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>
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