lua-users home
lua-l archive

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

In Lua 4.0 (alpha), there is a bug with the read() function.  It creates a
string whose length and contents don't match.  (ie: the strings it returns
are shorter than claimed.)

This causes functions like strfind() which read the whole string to crash
the program.

For example, I read a 28k file in, and the C library function strlen()
reported about 11k, but the Lua library function strlen() reported about
26k.  This was under Windows NT.

Let me know if you need a specific file to read in or a specific piece of
Lua code to read it.  I didn't delve all that deeply into the io library,
so it's possible I misdiagnosed the problem.