From 14a40819604181bcef0e827533b2c774bbfaeab4 Mon Sep 17 00:00:00 2001 From: atom0s Date: Thu, 16 Nov 2017 20:52:29 -0800 Subject: [PATCH] Fixed addon crash issues when a non-valid number/string is given. --- changecall.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changecall.lua b/changecall.lua index 8466dcb..4278ee2 100644 --- a/changecall.lua +++ b/changecall.lua @@ -25,7 +25,7 @@ _addon.author = 'atom0s'; _addon.name = 'ChangeCall'; -_addon.version = '1.0.1'; +_addon.version = '1.0.2'; require 'common' @@ -48,7 +48,7 @@ ashita.register_event('command', function(command, ntype) -- Pull the new call id to use.. local callid = string.gsub(command, '/changecall', ''):trim(); - if (callid == nil or string.len(callid) == 0) then + if (callid == nil or string.len(callid) == 0 or tonumber(callid) == nil) then settings.callid = 0; else settings.callid = tonumber(callid);