A few more improvements in 'luaO_pushvfstring'

- 'L' added to the 'BuffFS' structure
- '%c' does not handle control characters (it is not its business.
This now is done by the lexer, who is the one in charge of that
kind of errors.)
- avoid the direct use of 'l_sprintf' in the Lua kernel
This commit is contained in:
Roberto Ierusalimschy
2019-05-03 10:18:44 -03:00
parent b14609032c
commit 7c5786479c
4 changed files with 52 additions and 35 deletions

View File

@@ -453,8 +453,7 @@ else
str = "abc %c def"
testpfs("I", str, string.byte("A"))
-- non-printable character
assert(callpfs("I", str, 255) == "abc <\\255> def")
testpfs("I", str, 255)
str = string.rep("a", blen - 1) .. "%p" .. string.rep("cd", blen)
testpfs("P", str, {})