Browse Source

Fixed addon crash issues when a non-valid number/string is given.

master
atom0s 7 years ago
parent
commit
14a4081960
  1. 4
      changecall.lua

4
changecall.lua

@ -25,7 +25,7 @@ @@ -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) @@ -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);

Loading…
Cancel
Save