aboutsummaryrefslogtreecommitdiff
path: root/plugins/pdf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pdf.lua')
-rw-r--r--plugins/pdf.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/pdf.lua b/plugins/pdf.lua
index d4c7f26..9703f2d 100644
--- a/plugins/pdf.lua
+++ b/plugins/pdf.lua
@@ -335,7 +335,7 @@ end
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
local detect = function (c)
- return c:read (5) == "%PDF-"
+ return #c >= 5 and c:read (5) == "%PDF-"
end
local decode_xref_subsection = function (lex, start, count, result)