diff --git a/src/modules/graphics/opengl/wrap_Shader.cpp b/src/modules/graphics/opengl/wrap_Shader.cpp index a5647706a..a2cb1eb45 100644 --- a/src/modules/graphics/opengl/wrap_Shader.cpp +++ b/src/modules/graphics/opengl/wrap_Shader.cpp @@ -144,7 +144,7 @@ int w_Shader_sendInt(lua_State *L) delete[] values; if (should_error) - return lua_error(L); + return luaL_error(L, "%s", lua_tostring(L, -1)); return 0; } @@ -185,7 +185,7 @@ int w_Shader_sendFloat(lua_State *L) delete[] values; if (should_error) - return lua_error(L); + return luaL_error(L, "%s", lua_tostring(L, -1)); return 0; } @@ -248,7 +248,7 @@ int w_Shader_sendMatrix(lua_State *L) delete[] values; if (should_error) - return lua_error(L); + return luaL_error(L, "%s", lua_tostring(L, -1)); return 0; } diff --git a/src/modules/math/wrap_Math.cpp b/src/modules/math/wrap_Math.cpp index 05d0a33b7..029b313e4 100644 --- a/src/modules/math/wrap_Math.cpp +++ b/src/modules/math/wrap_Math.cpp @@ -86,7 +86,7 @@ int w_newRandomGenerator(lua_State *L) } if (should_error) - return lua_error(L); + return luaL_error(L, "%s", lua_tostring(L, -1)); } luax_pushtype(L, "RandomGenerator", MATH_RANDOM_GENERATOR_T, t);