From b0d1a98cd1b03822e779e755f58e170d696e04a2 Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 25 May 2011 20:55:38 +0200 Subject: [PATCH] Fix when too many variables are used. --- gfx/shader_glsl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gfx/shader_glsl.c b/gfx/shader_glsl.c index ffc3d1497d..bdfb6c4f35 100644 --- a/gfx/shader_glsl.c +++ b/gfx/shader_glsl.c @@ -380,6 +380,12 @@ error: static bool get_import_value(xmlNodePtr ptr) { + if (gl_tracker_info_cnt >= MAX_VARIABLES) + { + SSNES_ERR("Too many import variables ...\n"); + return false; + } + xmlChar *id = xmlGetProp(ptr, (const xmlChar*)"id"); xmlChar *semantic = xmlGetProp(ptr, (const xmlChar*)"semantic"); xmlChar *wram = xmlGetProp(ptr, (const xmlChar*)"wram");