LuaInterface: fix regression of optional parameter binding. (gui.text, for example)

This commit is contained in:
gochaism 2014-05-02 01:54:05 +00:00
parent 07e2c9758f
commit 00a1f8a3ba
3 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ namespace LuaInterface
if (LuaDLL.lua_isboolean(luaState, stackPos))
return extractValues[runtimeHandleValue];
}
else if (paramType == typeof(string))
else if (paramType == typeof(string) || paramType == typeof (char []))
{
if (LuaDLL.lua_isstring(luaState, stackPos))
return extractValues[runtimeHandleValue];

View File

@ -821,7 +821,7 @@ namespace LuaInterface
{
paramList.Add (null);
outList.Add (paramList.LastIndexOf (null));
} else if (_IsTypeCorrect (luaState, currentLuaParam, currentNetParam, out extractValue)) { // Type checking
} else if (currentLuaParam <= nLuaParams && _IsTypeCorrect (luaState, currentLuaParam, currentNetParam, out extractValue)) { // Type checking
var value = extractValue (luaState, currentLuaParam);
paramList.Add (value);
int index = paramList.LastIndexOf (value);

Binary file not shown.