summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2009-02-23 21:26:52 +0100
committerTor Andersson <tor@ghostscript.com>2009-02-23 21:26:52 +0100
commit9c52709ea80b7994803c0cac8d41b4fbcd04e9ab (patch)
treef7274da8e599acf7c49b34459df1686d5ba8d3f7
parentb26cafa2386003e5629abbdac10fa44be650d644 (diff)
downloadmupdf-9c52709ea80b7994803c0cac8d41b4fbcd04e9ab.tar.xz
Avoid sign-extension troubles in CMap parsing.
-rw-r--r--mupdf/pdf_cmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mupdf/pdf_cmap.c b/mupdf/pdf_cmap.c
index b09d69fd..f435f9ec 100644
--- a/mupdf/pdf_cmap.c
+++ b/mupdf/pdf_cmap.c
@@ -594,7 +594,7 @@ static int codefromstring(char *buf, int len)
{
int a = 0;
while (len--)
- a = (a << 8) | *buf++;
+ a = (a << 8) | *(unsigned char *)buf++;
return a;
}