From 85263a5d329afaeaa679a19e07937c4b0a756b85 Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Sun, 19 Jan 2014 15:07:29 -0600 Subject: [PATCH] Simplified some logic --- weights.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/weights.lua b/weights.lua index 19d4ee7..973a8d4 100644 --- a/weights.lua +++ b/weights.lua @@ -6,9 +6,7 @@ function ww_validateNumber(newChar, newText) if string.find(newChar, "^%d$") then return true elseif newChar == '.' then - local first = newText:find(".", 1, true) - local second = newText:find(".", first + 1, true) - if not second then + if not newText:find(".", newText:find(".", 1, true) + 1, true) then return true end elseif newChar == '-' then -- 1.7.9.5