summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-04-03 21:15:09 +0200
committerTor Andersson <tor.andersson@artifex.com>2018-04-11 13:44:50 +0200
commit35508e36e1ff1ec393cb08f3b81ffb61635968d1 (patch)
tree588bed73d3c8d4f96b6496aeea9712787dcc2566
parent4ed1b8523f813f4b94b33fd1c6109cdd24179056 (diff)
downloadmupdf-35508e36e1ff1ec393cb08f3b81ffb61635968d1.tar.xz
Fix CMap parsing bug when handling unicode surrogate pair ranges.
Increment the value after adding the mapping, not before.
-rw-r--r--source/pdf/pdf-cmap-parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-cmap-parse.c b/source/pdf/pdf-cmap-parse.c
index 38d98194..30c88e04 100644
--- a/source/pdf/pdf-cmap-parse.c
+++ b/source/pdf/pdf-cmap-parse.c
@@ -217,8 +217,8 @@ pdf_parse_bf_range(fz_context *ctx, pdf_cmap *cmap, fz_stream *file, pdf_lexbuf
while (lo <= hi)
{
- dststr[i-1] ++;
pdf_map_one_to_many(ctx, cmap, lo, dststr, i);
+ dststr[i-1] ++;
lo ++;
}
}