From bf6b50d96622df12240df7acd605fdd49b03cc78 Mon Sep 17 00:00:00 2001 From: Cosmin Apreutesei Date: Sat, 21 Mar 2020 13:24:27 +0200 Subject: [PATCH] unimportant --- mysql.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mysql.lua b/mysql.lua index 6c4620e..d7d894f 100644 --- a/mysql.lua +++ b/mysql.lua @@ -667,8 +667,10 @@ function res.fetch(res, mode, t) local row = fetch_row(res, numeric, assoc, decode, field_count, fields, t or {}) if packed then return row - else + elseif row then return true, unpack(row) + else + return true, nil end end @@ -684,8 +686,10 @@ function res.rows(res, mode, t) i = i + 1 if packed then return i, row - else + elseif row then return i, unpack(row) + else + return true, nil end end end