lua-users home
lua-l archive

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

> > Lua 5.3.3 fixes all bugs listed in
> >
> > 
> > Lua 5.3.3 also contains several internal improvements and includes a
> > revised reference manual:
> >
> Is there any intention to deal with the issue I raised in ?

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

-- Roberto