summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/pdf/pdf-encoding.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/pdf/pdf-encoding.c b/source/pdf/pdf-encoding.c
index b6bf3e11..d0a4bb88 100644
--- a/source/pdf/pdf-encoding.c
+++ b/source/pdf/pdf-encoding.c
@@ -52,11 +52,11 @@ pdf_lookup_agl(char *name)
return agl_code_list[m];
}
- if (strstr(buf, "uni") == buf)
+ if (buf[0] == 'u' && buf[1] == 'n' && buf[2] == 'i')
code = strtol(buf + 3, NULL, 16);
- else if (strstr(buf, "u") == buf)
+ else if (buf[0] == 'u')
code = strtol(buf + 1, NULL, 16);
- else if (strstr(buf, "a") == buf && strlen(buf) >= 3)
+ else if (buf[0] == 'a' && buf[1] != 0 && buf[2] != 0)
code = strtol(buf + 1, NULL, 10);
return (code >= 0 && code <= 0x10ffff) ? code : 0;