diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2022-09-19 17:07:49 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-09-20 08:37:17 +0100 |
commit | 118893141f533e74fff4a35291f405c57e883ce4 (patch) | |
tree | 724fe0f762360845e8beb0584eebc06328fa8bc6 | |
parent | 8a5b4e1457d3e8b3c31e3f7b7246ea42b6bb300b (diff) | |
download | ghostpdl-118893141f533e74fff4a35291f405c57e883ce4.tar.gz |
Correct gpdl PDF language detection.
-rw-r--r-- | pdf/pdftop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pdf/pdftop.c b/pdf/pdftop.c index 60c2fd191..9f5cfdf4c 100644 --- a/pdf/pdftop.c +++ b/pdf/pdftop.c @@ -60,9 +60,9 @@ extern const char gp_file_name_list_separator; static int pdf_detect_language(const char *s, int len) { - if (len < 5) - return 1; - return memcmp(s, "%!PDF", 5); + if (len >= 5 && memcmp(s, "%!PDF", 5) == 0) + return 100; + return 0; } static const pl_interp_characteristics_t * |