Quantcast

fix error when search string is empty

Eloi Charpentier [12-11-20 - 07:19]
fix error when search string is empty
Filename
Kaamelol.lua
diff --git a/Kaamelol.lua b/Kaamelol.lua
index 614841a..3c9efb8 100644
--- a/Kaamelol.lua
+++ b/Kaamelol.lua
@@ -45,6 +45,9 @@ function kaamelol_broadcast(msg)
 end

 function kaamelol_search(msg)
+  if not msg or msg == "" then
+    return false
+  end
   print("\nresults:")
   for i, entry in ipairs(KAAMELOL_CONTENT) do
     local title = entry["TITLE"]