Fixed compilation warning

This commit is contained in:
Sour 2018-12-31 15:05:29 -05:00
parent 2383499533
commit 7e8b89cf42
2 changed files with 2 additions and 3 deletions

View file

@ -181,9 +181,8 @@ int LuaApi::GetLibrary(lua_State *lua)
int LuaApi::GetLabelAddress(lua_State *lua)
{
LuaCallHelper l(lua);
l.ForceParamCount(1);
string label = l.ReadString();
checkminparams();
checkparams();
errorCond(label.length() == 0, "label cannot be empty");
std::shared_ptr<LabelManager> lblMan = _debugger->GetLabelManager();

View file

@ -19,7 +19,7 @@ bool LuaCallHelper::CheckParamCount(int minParamCount)
return true;
}
if(_stackSize != _paramCount) {
string message = string("too ") + (_stackSize < _paramCount ? "little" : "many") + " parameters. expected " + std::to_string(_paramCount) + " got " + std::to_string(_stackSize);
string message = string("too ") + (_stackSize < _paramCount ? "few" : "many") + " parameters. expected " + std::to_string(_paramCount) + " got " + std::to_string(_stackSize);
luaL_error(_lua, message.c_str());
return false;
}