summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-03-25 16:37:17 +0000
committerRobin Watts <robin.watts@artifex.com>2015-03-25 16:38:25 +0000
commita146958b995b113821aac6c0c4b2147214ce9042 (patch)
treec399465fd2ea44cd6502115c976a826675e2b0fd /source/fitz
parent2f1894e96582b75ed0b3b7bcef6dc7358991fb93 (diff)
downloadmupdf-a146958b995b113821aac6c0c4b2147214ce9042.tar.xz
Fix problems with fz_printf.
My recent changes to support %010Zd were broken in many interesting ways. Fixed here.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/printf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/fitz/printf.c b/source/fitz/printf.c
index f63da293..0e0f380a 100644
--- a/source/fitz/printf.c
+++ b/source/fitz/printf.c
@@ -176,7 +176,7 @@ fz_vsnprintf(char *buffer, int space, const char *fmt, va_list args)
if (c == '0' && fmt[0] && fmt[1]) {
z = *fmt++ - '0';
c = *fmt++;
- if (c >= '0' && 'c' <= '9' && fmt[0])
+ while (c >= '0' && c <= '9' && fmt[0])
{
z = z*10 + c - '0';
c = *fmt++;
@@ -199,6 +199,8 @@ fz_vsnprintf(char *buffer, int space, const char *fmt, va_list args)
case 'Z':
if (sizeof(fz_off_t) >= 8)
length = 64;
+ else
+ length = 32;
break;
}
if (length != 0)