From 35508e36e1ff1ec393cb08f3b81ffb61635968d1 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 3 Apr 2018 21:15:09 +0200 Subject: Fix CMap parsing bug when handling unicode surrogate pair ranges. Increment the value after adding the mapping, not before. --- source/pdf/pdf-cmap-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ++; } } -- cgit v1.2.3