aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/hashes.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/hashes.lua b/util/hashes.lua
index 5ed9d3ac..2fd0fbd8 100644
--- a/util/hashes.lua
+++ b/util/hashes.lua
@@ -1,5 +1,5 @@
-local softreq = function (...) return select(2, pcall(require, ...)); end
+local softreq = function (...) local ok, lib = pcall(require, ...); if ok then return lib; else return nil; end end
local error = error;
module "hashes"