OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11a4690
)
Fix bug with %c... takes care of bug reported with busybox ps.
author
Manuel Novoa III
<mjn3@codepoet.org>
Thu, 15 Mar 2001 19:31:09 +0000
(19:31 -0000)
committer
Manuel Novoa III
<mjn3@codepoet.org>
Thu, 15 Mar 2001 19:31:09 +0000
(19:31 -0000)
libc/stdio/scanf.c
patch
|
blob
|
history
diff --git
a/libc/stdio/scanf.c
b/libc/stdio/scanf.c
index
7070727
..
dbb6f8d
100644
(file)
--- a/
libc/stdio/scanf.c
+++ b/
libc/stdio/scanf.c
@@
-299,10
+299,13
@@
va_list ap;
scan_ungetc(&sc);
}
if (p-spec < 5) { /* [,c,s - string conversions */
- if ((*p == 'c') && (sc.width == INT_MAX)) {
- sc.width = 1;
- }
invert = 0;
+ if (*p == 'c') {
+ invert = 1;
+ if (sc.width == INT_MAX) {
+ sc.width = 1;
+ }
+ }
for (i=0 ; i<= UCHAR_MAX ; i++) {
scanset[i] = ((*p == 's') ? (isspace(i) == 0) : 0);
}