From 0a77250340cea2a966eb6eae637bd2992108d0bb Mon Sep 17 00:00:00 2001 From: Patrick Frey Date: Fri, 20 Nov 2020 22:09:50 +0100 Subject: [PATCH] Fixed missing init in bcd:bits constructor --- luabcd-1.0-7.rockspec => luabcd-1.0-8.rockspec | 4 ++-- src/lualib_bcd.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) rename luabcd-1.0-7.rockspec => luabcd-1.0-8.rockspec (96%) diff --git a/luabcd-1.0-7.rockspec b/luabcd-1.0-8.rockspec similarity index 96% rename from luabcd-1.0-7.rockspec rename to luabcd-1.0-8.rockspec index 4efb713..852fd35 100644 --- a/luabcd-1.0-7.rockspec +++ b/luabcd-1.0-8.rockspec @@ -1,8 +1,8 @@ package = "LuaBcd" -version = "1.0-7" +version = "1.0-8" source = { url = "git://github.com/patrickfrey/luabcd", - tag = "1.0-7" + tag = "1.0-8" } description = { summary = "BCD arithmetic for arbitrary large integers", diff --git a/src/lualib_bcd.cpp b/src/lualib_bcd.cpp index 3b126f8..3afa9f9 100644 --- a/src/lualib_bcd.cpp +++ b/src/lualib_bcd.cpp @@ -142,6 +142,7 @@ static int bcd_bits_create( lua_State* ls) } int nofBits = lua_tointeger( ls, 1); bcd_bits_userdata_t* rt = (bcd_bits_userdata_t*)lua_newuserdata( ls, sizeof(bcd_bits_userdata_t)); + rt->init(); luaL_getmetatable( ls, bcd_bits_userdata_t::metatableName()); lua_setmetatable( ls, -2); rt->create( bcd::BigInt::getBitValues( nofBits));