Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54621
b: refs/heads/master
c: c6b40d1
h: refs/heads/master
i:
  54619: 69d4d4a
v: v3
  • Loading branch information
Johannes Berg authored and Linus Torvalds committed May 8, 2007
1 parent 32c6e1b commit 275e39a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 757dea93e136b219af09d3cd56a81063fdbdef1a
refs/heads/master: c6b40d16d1cfa1a01158049bb887a9bbe48ef7ba
11 changes: 11 additions & 0 deletions trunk/lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,17 @@ int vsscanf(const char * buf, const char * fmt, va_list args)
break;
str = next;
}

/*
* Now we've come all the way through so either the input string or the
* format ended. In the former case, there can be a %n at the current
* position in the format that needs to be filled.
*/
if (*fmt == '%' && *(fmt + 1) == 'n') {
int *p = (int *)va_arg(args, int *);
*p = str - buf;
}

return num;
}

Expand Down

0 comments on commit 275e39a

Please sign in to comment.