[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Badly formatted os.date format crashes
- From: Rob Kendrick <lua-l@...>
- Date: Tue, 9 Sep 2008 11:59:37 +0100
On Tue, 09 Sep 2008 11:52:25 +0100
David Welch <firstname.lastname@example.org> wrote:
> Just a heads up about a possible bug. I have a lua script with:
> os.date("%.d", 123)
> which crashes when run. The lua version is Lua 5.1.4 which I
> downloaded from lua binaries.
This doesn't cause anything other than the expected to happen (ie,
it returns "%.d") using 5.1.2 or 5.1.4 under Ubuntu Linux, so I suspect
it may be your OS's C library treating such strings differently than
If this is a widespread issue (which OS are you on) then it may be
worth investigating adding a layer of checking of the format string to
Lua's wrapper for it.