[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: liolib.c:read_number() should use double rather than lua_Number
- From: Jim Brooks <jimblist@...>
- Date: Sat, 7 Jan 2012 19:51:40 -0500
FYI, the "%lf" in fscanf("%lf",pDouble) requires a pointer-to-adouble.
I redefined LUA_NUMBER as single-precision float then noticed this.
#define LUA_NUMBER_SCAN "%lf"
liolib.c:
static int read_number (lua_State *L, FILE *f) {
#if 0
lua_Number d;
#else
double d;
#endif
if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) {
--
Jim Brooks