lua-users home
lua-l archive

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

I’m using Lua 5.1.3 with the LNUM patch applied. We’re using the following

Everything has been going great for months now but a user as reported an
error that has my stumped.  He added a multiline comment to one of his lua
files. Now when the application tries to call this function we get an access
violation error at the very next line (when calling luaH_getint).  Looking at
luaH_getint the table being passed in is null for some reason. The line
that’s dying:

      if (cast(unsigned int, key-1) < cast(unsigned int, t->sizearray))   <--
t is null here

Remove the multiline comment and everything runs fine. Change the comment
from a multiple line comment to single-line comments and everything works
fine.  If I try this comment in another Lua file everything works fine. 

I’m guessing we’re hitting some sort of corner case during parsing but I
can’t figure out what it is.  I’m hoping someone has seen this and might
recommend a fix?