lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Jan 27, 2014 at 12:04 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:

>  2. If the input is not trustworthy, you can say
>  safe={}
>  t = assert( loadstring("return {"..s.."}",nil,nil,safe) )()

This isn't going to work. The string is just a list of assignments, there are no separators between key-value pairs, so "{"..s.."}" is not a correct table literal. 

Peter