From 9fa7e0e92ddae9ff68f50ad20bbdfc8a3c09135a Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Mon, 24 Mar 2008 21:50:48 +0000 Subject: * CBI: updates * UCI: fixed argument escaping --- src/ffluci/util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ffluci/util.lua') diff --git a/src/ffluci/util.lua b/src/ffluci/util.lua index 38f33a20d4..caa8e41de3 100644 --- a/src/ffluci/util.lua +++ b/src/ffluci/util.lua @@ -156,12 +156,12 @@ end -- Validates a variable -function validate(value, cast_number, cast_int, valid) +function validate(value, valid, cast_number, cast_int) if cast_number or cast_int then value = tonumber(value) end - if cast_int and not(value % 1 == 0) then + if cast_int and value and not(value % 1 == 0) then value = nil end -- cgit v1.2.3