diff options
-rw-r--r-- | fitz/stm_buffer.c | 4 | ||||
-rw-r--r-- | pdf/pdf_form.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fitz/stm_buffer.c b/fitz/stm_buffer.c index 1202617e..a4b65cac 100644 --- a/fitz/stm_buffer.c +++ b/fitz/stm_buffer.c @@ -196,7 +196,7 @@ fz_buffer_cat_pdf_string(fz_context *ctx, fz_buffer *buffer, const char *text) char *d; char c; - while (c = *s++) + while ((c = *s++) != 0) { switch (c) { @@ -220,7 +220,7 @@ fz_buffer_cat_pdf_string(fz_context *ctx, fz_buffer *buffer, const char *text) s = text; d = (char *)buffer->data + buffer->len; *d++ = '('; - while (c = *s++) + while ((c = *s++) != 0) { switch (c) { diff --git a/pdf/pdf_form.c b/pdf/pdf_form.c index e0dc0f06..56e2e5d8 100644 --- a/pdf/pdf_form.c +++ b/pdf/pdf_form.c @@ -823,7 +823,7 @@ static fz_buffer *create_text_appearance(pdf_document *doc, fz_rect *bbox, fz_ma } else if (info->comb) { - int i, n = min((int)strlen(text), info->max_len); + int i, n = MIN((int)strlen(text), info->max_len); float comb_width = full_width/info->max_len; float char_width = pdf_text_stride(ctx, info->font_rec.font, fontsize, (unsigned char *)"M", 1, FLT_MAX, NULL); float init_skip = (comb_width - char_width)/2.0; |