From 22c8eb7e746827c694693895fc709a4ba7fdb957 Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Thu, 22 Oct 2015 16:15:23 +0200
Subject: [PATCH] forms: Fix showing of some non-ASCII characters
The &uChar is an array with just 1 member not 2.
This fixes mapping of some Unicode characters to
character codes.
---
poppler/Annot.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index f3f479c..89bbc89 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -4125,7 +4125,7 @@ void Annot::layoutText(GooString *text, GooString *outBuf, int *i,
// This assumes an identity CMap.
outBuf->append((uChar >> 8) & 0xff);
outBuf->append(uChar & 0xff);
- } else if (ccToUnicode->mapToCharCode(&uChar, &c, 2)) {
+ } else if (ccToUnicode->mapToCharCode(&uChar, &c, 1)) {
ccToUnicode->decRefCnt();
if (font->isCIDFont()) {
// TODO: This assumes an identity CMap. It should be extended to
--
2.4.3