mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Peter Oberndorfer <kumbayo84@arcor.de>
- Implement %p for scanf. svn path=/trunk/; revision=34293
This commit is contained in:
parent
b33ec42e10
commit
c2eaa10731
1 changed files with 3 additions and 1 deletions
|
@ -149,6 +149,8 @@ _FUNCTION_ {
|
|||
}
|
||||
/* read type */
|
||||
switch(*format) {
|
||||
case 'p':
|
||||
case 'P': /* pointer. */
|
||||
case 'x':
|
||||
case 'X': /* hexadecimal integer. */
|
||||
base = 16;
|
||||
|
@ -179,7 +181,7 @@ _FUNCTION_ {
|
|||
if (width>0) width--;
|
||||
}
|
||||
/* look for leading indication of base */
|
||||
if (width!=0 && nch == '0') {
|
||||
if (width!=0 && nch == '0' && *format != 'p' && *format != 'P') {
|
||||
nch = _GETC_(file);
|
||||
if (width>0) width--;
|
||||
seendigit=1;
|
||||
|
|
Loading…
Reference in a new issue