git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Virtual memory & paging
[lunaix-os.git]
/
lunaix-os
/
libs
/
libc
/
stdio
/
sprintf.c
diff --git
a/lunaix-os/libs/libc/stdio/sprintf.c
b/lunaix-os/libs/libc/stdio/sprintf.c
index 15a7fe2503fd840eeb00d245a912c98ba02f452a..51466cd59483035be7e76e10f68c5a9b96e13888 100644
(file)
--- a/
lunaix-os/libs/libc/stdio/sprintf.c
+++ b/
lunaix-os/libs/libc/stdio/sprintf.c
@@
-64,7
+64,10
@@
__sprintf_internal(char* buffer, char* fmt, va_list args)
}
case 'p': {
uintptr_t dptr = va_arg(args, uintptr_t);
- __itoa_internal((int)dptr, buffer + ptr, 16, &adv);
+ buffer[ptr] = '0';
+ buffer[ptr+1] = 'x';
+ __itoa_internal((int)dptr, buffer + ptr + 2, 16, &adv);
+ adv+=2;
break;
}
case '%': {