aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--valua.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/valua.lua b/valua.lua
index c9589f9..d4d62b9 100644
--- a/valua.lua
+++ b/valua.lua
@@ -54,7 +54,8 @@ function valua:new(obj)
-- __call will run only when the value is validated
self.__call = function(t,value)
local res = true
- local fres, err = nil
+ local err = nil
+ local fres
if value == nil and t.allow_nil then
return res, err