diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2012-07-26 01:39:25 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-07-26 15:51:00 +0200 |
commit | 5af5c027d1767a47f26d48df78596c2a8aa29805 (patch) | |
tree | c509c9adb07c197aae1c2a4f2691cfd0ecb507ed /pdf/pdf_type3.c | |
parent | e4517104c7465c39c86fb8c2eddcdc4cde48b248 (diff) | |
download | mupdf-5af5c027d1767a47f26d48df78596c2a8aa29805.tar.xz |
Use integer clamping function instead of reimplementing it
Diffstat (limited to 'pdf/pdf_type3.c')
-rw-r--r-- | pdf/pdf_type3.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pdf/pdf_type3.c b/pdf/pdf_type3.c index 4df46ce3..2c18f698 100644 --- a/pdf/pdf_type3.c +++ b/pdf/pdf_type3.c @@ -89,8 +89,7 @@ pdf_load_type3_font(pdf_document *xref, pdf_obj *rdb, pdf_obj *dict) k = pdf_to_int(item); if (pdf_is_name(item)) estrings[k++] = pdf_to_name(item); - if (k < 0) k = 0; - if (k > 255) k = 255; + k = fz_clampi(k, 0, 255); } } } |