lua-users home
lua-l archive

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

On Tue, Nov 16, 2010 at 1:15 PM, Luiz Henrique de Figueiredo
<> wrote:
> This release candidate will be the alpha version if no glitches are found
> in the next 10 days or so.
> All feedback welcome. Thanks.

It would seem that the string library doesn't yet completely like
embedded null characters in patterns. In particular, the following
code doesn't give the expected result:

Lua 5.2.0 (alpha)  Copyright (C) 1994-2010, PUC-Rio
> return string.find("\0\0","\0.")

I believe that this is caused by the following line in lstrlib.c,
which causes patterns with no special characters prior to the first
embedded null character to be treated as plaintext.

strpbrk(p, SPECIALS) == NULL)) {  /* or no special characters? */