aboutsummaryrefslogtreecommitdiff
path: root/plugins/gzip.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gzip.lua')
-rw-r--r--plugins/gzip.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/gzip.lua b/plugins/gzip.lua
index 4d8bf15..ae5ccb6 100644
--- a/plugins/gzip.lua
+++ b/plugins/gzip.lua
@@ -16,7 +16,7 @@
--
local detect = function (c)
- return c:read (2) == "\x1f\x8b"
+ return #c >= 2 and c:read (2) == "\x1f\x8b"
end
local function latin1_to_utf8 (s)