From 8c44b0425f0e7030b3341fb4ea7a47b8558119b9 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 25 Nov 2008 01:56:20 +0000 Subject: Fix softreq, so it reports when no suitable MD5 library is found --- util/hashes.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') 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" -- cgit v1.2.3