From a6306d701242c674d77cbb0f5120db1aaa6ebfbb Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 14 Dec 2013 00:07:41 -0500 Subject: [PATCH] Cast result of floating point retrieval before receiving it --- sol/stack.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sol/stack.hpp b/sol/stack.hpp index 5bc59091..617bc605 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -45,7 +45,7 @@ inline T get_unsigned(lua_State* L, std::false_type, int index = -1) { template inline T get_arithmetic(lua_State* L, std::false_type, int index = -1) { // T is a floating point - return lua_tonumber(L, index); + return static_cast(lua_tonumber(L, index)); } template