[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bug in read( file, "*a" )
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sun, 18 Jun 2000 10:21:42 -0300 (EST)
>From lua-l@tecgraf.puc-rio.br Sat Jun 17 19:07:54 2000
>From: Fred Bertsch <fb@ee.cornell.edu>
>
>
>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.
This can happen and still be right, if the file contains embedded zeros.
>This causes functions like strfind() which read the whole string to crash
>the program.
Now, that shouldn't happen.
Perhaps this is a bug in strfind, possibily the one below:
** lstrlib.c
Tue May 2 15:27:58 EST 2000
>> `strfind' gets wrong subject length when there is an offset
(by Jon Kleiser; since 4.0a)
>Lua code to read it. I didn't delve all that deeply into the io library,
>so it's possible I misdiagnosed the problem.
Yes, please send data and code that reproduces the problem.
Thanks.