[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug in LNUM patch
- From: Richard Hundt <richardhundt@...>
- Date: Wed, 12 May 2010 13:58:30 +0200
Flemming Madsen wrote:
I think i have found a bug.
The LNUM patch changes the test below from lua_isnumber() to
lua_isinteger() in luaL_checkinteger(). However this has the
unfortunate side effect of causing Lua to claim that numbers between
-1.0 < x < 1.0 can not be integers:
Integers are defined as a subset of real numbers that are *whole* (i.e
which can be written without a fractional or decimal component). Numbers
between -1.0 < x < 1.0 therefore *cannot* be integers, so unless I've
misunderstood, the existing behaviour was exactly what you wanted there.