diff options
Diffstat (limited to 'main/lua-dbi/fix-table-maxn.patch')
-rw-r--r-- | main/lua-dbi/fix-table-maxn.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/main/lua-dbi/fix-table-maxn.patch b/main/lua-dbi/fix-table-maxn.patch new file mode 100644 index 0000000000..a5036ab496 --- /dev/null +++ b/main/lua-dbi/fix-table-maxn.patch @@ -0,0 +1,26 @@ +From 23bac7124f27c7e36431932e77c68fca91c96c25 Mon Sep 17 00:00:00 2001 +From: sparked435 <aaron@zadzmo.org> +Date: Thu, 24 Aug 2017 15:05:49 -0400 +Subject: [PATCH] Fix minor post-5.1 bug: table.maxn() has been removed. Should + only trigger if no drivers are available, an error condition anyway. + +Patch-Source: https://github.com/mwild1/luadbi/commit/23bac7124f27c7e36431932e77c68fca91c96c25 +--- + DBI.lua | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/DBI.lua b/DBI.lua +index 4dc77d2..e1f504a 100644 +--- a/DBI.lua ++++ b/DBI.lua +@@ -28,8 +28,8 @@ local function available_drivers() + end + + -- no drivers available +- if table.maxn(available) < 1 then +- available = {'(None)'} ++ if #available < 1 then ++ available = {'(None)'} + end + + return available |