5.3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

5.3

Achromat
Hello,
 
today i have compile lua5.3 ,  config change first to 32 Bit integer.
 
I have over the years around 250 Scripts, and see that 25% generates
Errors. The stack is controlled, and stay always good.
 
At Moment i have yet not see the mainproblem, must analyze it .
 
In some situation of  lua_tointeger(lua, 1)  i take wrong values or 0
Not sure at moment what the problem it is.
 
Give it in this case helpfull informations, to reduce my  problem analysis ?
 
Many Thanks
Karsten
 
 
Reply | Threaded
Open this post in threaded view
|

Re: 5.3

Roberto Ierusalimschy
> In some situation of  lua_tointeger(lua, 1)  i take wrong values or 0
> Not sure at moment what the problem it is.

A 0 can mean that the value at that position is not an integer (that
is, it is a float with a fractional part). You may want to compile Lua
defining the macro LUA_FLOORN2I (-DLUA_FLOORN2I) to see whether it
helps. (That macro makes Lua convert non-integer floating points to
integers by taking their floor.)

-- Roberto