From 64d9a00a9934cd06401f4b9ec2e14950a4423a87 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 26 Oct 2009 04:52:07 +0000 Subject: nixio: store stats and other number information as integer, which works better when lua number support is downgraded from double to float --- libs/nixio/src/binary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/nixio/src/binary.c') diff --git a/libs/nixio/src/binary.c b/libs/nixio/src/binary.c index c2de388173..2c41622280 100644 --- a/libs/nixio/src/binary.c +++ b/libs/nixio/src/binary.c @@ -97,7 +97,7 @@ static const uint32_t nixio__crc32_tbl[] = { static int nixio_bin_crc32(lua_State *L) { size_t len; const char *buffer = luaL_checklstring(L, 1, &len); - uint32_t value = luaL_optnumber(L, 2, 0); + uint32_t value = luaL_optinteger(L, 2, 0); value = ~value; for (size_t i=0; i