Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tome4-1.1.3-fix-implicit-declaration.patch
From: Julian Ospald <hasufell@gentoo.org>
Date: Fri Dec 27 13:53:56 UTC 2013
Subject: fix array bounds
--- t-engine4-src-1.1.3/src/shaders.c
+++ t-engine4-src-1.1.3/src/shaders.c
@@ -262,7 +262,7 @@ static int program_set_uniform_number3_f
static int program_set_uniform_number4_fast(lua_State *L)
{
shader_type *p = (shader_type*)lua_touserdata(L, 1);
- GLfloat i[2];
+ GLfloat i[4];
i[0] = luaL_checknumber(L, 2);
i[1] = luaL_checknumber(L, 3);
i[2] = luaL_checknumber(L, 4);
From: Julian Ospald <hasufell@gentoo.org>
Date: Fri Dec 27 13:58:40 UTC 2013
Subject: fix implicit function declaration
--- t-engine4-src-1.1.3/src/particles.c
+++ t-engine4-src-1.1.3/src/particles.c
@@ -20,6 +20,7 @@
*/
#include "display.h"
#include "lua.h"
+#include "lua_externs.h"
#include "lauxlib.h"
#include "lualib.h"
#include "core_lua.h"
--- t-engine4-src-1.1.3/src/lua_externs.h
+++ t-engine4-src-1.1.3/src/lua_externs.h
@@ -1,3 +1,5 @@
+#include <types.h>
+
/* Some lua stuff that's external but has no headers */
int luaopen_bit(lua_State *L);
int luaopen_diamond_square(lua_State *L);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment