[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.3.3 (rc1) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 12 May 2016 10:11:06 -0300
> > Lua 5.3.3 fixes all bugs listed in
> > http://www.lua.org/bugs.html#5.3.2
> > Lua 5.3.3 also contains several internal improvements and includes a
> > revised reference manual:
> > http://www.lua.org/work/doc/
> Is there any intention to deal with the issue I raised in http://lua-users.org/lists/lua-l/2016-04/msg00032.html ?
It was dealt with. We decided to leave it as it was.
> Namely that between version 5.3.1 and 5.3.2 a change was made
> to the packing behaviour of fixed length strings (pattern "cn")
> which violates the guarantees in the documentation. Specifically
> "string.pack checks whether the given value fits in the given size"
> and "All padding is ... ignored by string.unpack".
Are you serious about the documentation?
For options "!n", "sn", "in", and "In", n can be any integer between
1 and 16. All integral options check overflows; string.pack checks
whether the given value fits in the given size; string.unpack checks
whether the read value fits in a Lua integer.
Did you really understand that this phrase talks about strings? By
your standard, the documentation also says that string values should
fit in a Lua integer to be unpacked. That would be a much worse