[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua crashing on unrecognized strings
- From: Peter Cawley <lua@...>
- Date: Mon, 24 Aug 2009 14:03:37 +0100
os.date is a wrapping around the strftime function provided by the C
runtime. On windows, the Microsoft C runtime is typically used, so
you'll want to consult the MSDN reference on strftime rather than one
of the standard documents. Likewise, io.open wraps fopen, and if the
underlying C runtime explodes on invalid input, then so will Lua.
On Mon, Aug 24, 2009 at 1:52 PM, Stuart P.Bentley<stuart@testtrack4.com> wrote:
> Using the lua.exe interpreter provided with Lua for Windows, passing any
> letter to (os.date("%"..letter)) other than a-d, j, m, p, w-z, A, B, H, I,
> M, S, U, or W-Z is causing to crash (as in "has encountered a problem and
> needs to close" crash). This also happens when calling io.open with any
> undefined format string.
>
> That can't be right, can it? (At the very least %C, %D, %e, %h, %n, %r, %R,
> %t, %T, %u, and %V should evaluate as they are defined in the standard
> (http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html).)
>
>