elua: format bug fix
This commit is contained in:
parent
b304316b81
commit
0c7b3e5d6b
|
@ -185,7 +185,7 @@ local error = error
|
||||||
local type = type
|
local type = type
|
||||||
local tostr = tostring
|
local tostr = tostring
|
||||||
|
|
||||||
local bytes = { ("cdeEfgGiopuxXsq"):byte() }
|
local bytes = { ("cdeEfgGiopuxXsq"):byte(1, #("cdeEfgGiopuxXsq")) }
|
||||||
for i, v in ipairs(bytes) do bytes[v] = true end
|
for i, v in ipairs(bytes) do bytes[v] = true end
|
||||||
|
|
||||||
local Str_Buf = ffi.metatype("Str_Buf", {
|
local Str_Buf = ffi.metatype("Str_Buf", {
|
||||||
|
@ -270,7 +270,7 @@ 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 bytes[c] then
|
if not bytes[c] then
|
||||||
buf:append_str(n)
|
buf:append_str(n)
|
||||||
buf:append_char(36) -- $
|
buf:append_char(36) -- $
|
||||||
buf:append_char(c)
|
buf:append_char(c)
|
||||||
|
|
Loading…
Reference in New Issue