lua-users home
lua-l archive

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


On 22 August 2010 14:25, HyperHacker <hyperhacker@gmail.com> wrote:
>

> Why compile-time? Hide the real load() in a table that the script
> never has access to, and provide your own load() that rejects any
> string beginning with string.char(0x27). There you go.
>
> (Obviously don't ACTUALLY use string.char(0x27) in the function, but
> rather its precomputed result, lest the script simply redefine char.)
>

Exactly one reason to have it compile-time, so that people don't make
the same fatal mistake you just did ;)

Escape (and the first char of binary chunks) is "\027", not 0x27.

Matthew