diff options
author | Etiene <Etiene@users.noreply.github.com> | 2014-03-12 13:00:22 +0000 |
---|---|---|
committer | Etiene <Etiene@users.noreply.github.com> | 2014-03-12 13:00:22 +0000 |
commit | 6d35907d23867574be7add112a2e0455a05259c2 (patch) | |
tree | aac5b6e202573fd5594f153e63ba83f49fc17330 | |
parent | 5753af8eb67dc1bddddfa699ae6e1bea7e94e6ec (diff) | |
parent | 15703a5b8264fb4f438a8028445f1750e48a9eaf (diff) | |
download | valua-6d35907d23867574be7add112a2e0455a05259c2.tar.gz valua-6d35907d23867574be7add112a2e0455a05259c2.tar.bz2 valua-6d35907d23867574be7add112a2e0455a05259c2.zip |
Merge pull request #2 from ignacio/patch-1
Fixes packing/unpacking with nil values
-rw-r--r-- | valua.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -36,7 +36,8 @@ function valua:new(obj) --saves a function named _<index> with its args in a funcs table, to be used later when validating return function(...) local args = {...} - local f = function(value) return valua['_'..k](value,unpack(args)) end + local n = select("#", ...) + local f = function(value) return valua['_'..k](value, unpack(args, 1, n)) end tinsert(t.funcs,f) return t end |