forked from enlightenment/efl
elua: some more checking for no value
This commit is contained in:
parent
0c7b3e5d6b
commit
5eccfb29b7
|
@ -295,6 +295,9 @@ getmetatable("").__mod = function(fmts, params)
|
||||||
nbuf:append_char(c)
|
nbuf:append_char(c)
|
||||||
c, s = s[0], s + 1
|
c, s = s[0], s + 1
|
||||||
end
|
end
|
||||||
|
if argn > #params then
|
||||||
|
fmterr(idx, "no value")
|
||||||
|
end
|
||||||
local stat, val = pcall(fmt, "%" .. tostr(nbuf),
|
local stat, val = pcall(fmt, "%" .. tostr(nbuf),
|
||||||
params[argn])
|
params[argn])
|
||||||
nbuf:clear()
|
nbuf:clear()
|
||||||
|
|
Loading…
Reference in New Issue