From b0849343111200cf3e67365643cec8ac2a4dbf79 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 16 Nov 2016 17:37:43 +0000 Subject: [PATCH] Fix Shader:send and sendColor ignoring the last argument for shader uniform arrays. --- src/modules/graphics/opengl/wrap_Shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/opengl/wrap_Shader.cpp b/src/modules/graphics/opengl/wrap_Shader.cpp index e13cc7926..0a3b5f149 100644 --- a/src/modules/graphics/opengl/wrap_Shader.cpp +++ b/src/modules/graphics/opengl/wrap_Shader.cpp @@ -48,7 +48,7 @@ int w_Shader_getWarnings(lua_State *L) static int _getCount(lua_State *L, int startidx, const Shader::UniformInfo *info) { - return std::min(std::max(lua_gettop(L) - startidx, 1), info->count); + return std::min(std::max(lua_gettop(L) - startidx + 1, 1), info->count); } template