[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Bug in Lua when using signed long
- From: liam mail <liam.list@...>
- Date: Sun, 13 Dec 2009 12:11:21 +0000
On macosx x64 where long is eight bytes and lua_Integer is defined as ptrdiff_t which is also eight bytes long, the following fails:
signed long input((std::numeric_limits<signed long >::max)());
lua_pushinteger(L, input );
signed long result = ( lua_tointeger( L, -1) );
CPPUNIT_ASSERT_EQUAL(input, result);
- Expected: 9223372036854775807
- Actual : -9223372036854775808