diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-09-18 01:57:37 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-09-18 12:46:33 +0800 |
commit | c798eb4f1ae9fe17f7971422ddf901394d927710 (patch) | |
tree | 782ba22ba72ceda36d133ea46c74374e88c8f321 | |
parent | 1823fa3855893d3352d29c16edd8d3c16749983c (diff) | |
download | mupdf-c798eb4f1ae9fe17f7971422ddf901394d927710.tar.xz |
Make fz_printf() support %p.
This is used at several places in mupdf.
-rw-r--r-- | source/fitz/printf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/fitz/printf.c b/source/fitz/printf.c index 2246b4c9..36f29094 100644 --- a/source/fitz/printf.c +++ b/source/fitz/printf.c @@ -262,6 +262,12 @@ fz_vsnprintf(char *buffer, size_t space, const char *fmt, va_list args) f = va_arg(args, double); fmtfloat(&out, f); break; + case 'p': + length = 8 * sizeof(void *); + z = 2 * sizeof(void *); + fmtputc(&out, '0'); + fmtputc(&out, 'x'); + /* fallthrough */ case 'x': if (length == 64) { |