Format luaL_error strings properly in ShaderEffect lua wrapper code

This commit is contained in:
Alexander Szpakowski
2013-01-07 06:39:33 -04:00
parent 88af7239c3
commit 609ef2c4e4
3 changed files with 8 additions and 5 deletions
@@ -63,7 +63,7 @@ static int _sendScalars(lua_State *L, ShaderEffect *effect, const char *name, in
catch(love::Exception &e)
{
delete[] values;
return luaL_error(L, e.what());
return luaL_error(L, "%s", e.what());
}
delete[] values;
@@ -104,7 +104,7 @@ static int _sendVectors(lua_State *L, ShaderEffect *effect, const char *name, in
catch(love::Exception &e)
{
delete[] values;
return luaL_error(L, e.what());
return luaL_error(L, "%s", e.what());
}
delete[] values;
@@ -178,7 +178,7 @@ int w_ShaderEffect_sendMatrix(lua_State *L)
catch(love::Exception &e)
{
delete[] values;
return luaL_error(L, e.what());
return luaL_error(L, "%s", e.what());
}
delete[] values;
@@ -197,7 +197,7 @@ int w_ShaderEffect_sendImage(lua_State *L)
}
catch(love::Exception &e)
{
luaL_error(L, e.what());
luaL_error(L, "%s", e.what());
}
return 0;
@@ -215,7 +215,7 @@ int w_ShaderEffect_sendCanvas(lua_State *L)
}
catch(love::Exception &e)
{
luaL_error(L, e.what());
luaL_error(L, "%s", e.what());
}
return 0;