From 9aadc2a993372d3e44097d289798361c11163bb5 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Fri, 17 Apr 2015 17:40:28 +0800 Subject: [PATCH] Fix the error that the default value of `a` should be 255 when converting a color3b_table into cocos2d::Color4B, --- cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp index db22dc8a22..16bf09ea3c 100644 --- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp +++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.cpp @@ -630,7 +630,7 @@ bool luaval_to_color4b(lua_State* L,int lo,Color4B* outValue, const char* funcNa lua_pushstring(L, "a"); lua_gettable(L,lo); - outValue->a = lua_isnil(L,-1) ? 0 : lua_tonumber(L,-1); + outValue->a = lua_isnil(L,-1) ? 255 : lua_tonumber(L,-1); lua_pop(L,1); }