From 66bc6a5af37922db5d890d6f9d56531c2efb77c1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 10 May 2008 23:11:18 -0400 Subject: [PATCH] Fixed underallocation bug. Constants are vec4, not float! --HG-- branch : trunk --- mojoshader_opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mojoshader_opengl.c b/mojoshader_opengl.c index 3e1f67f2..46a4328e 100644 --- a/mojoshader_opengl.c +++ b/mojoshader_opengl.c @@ -695,7 +695,7 @@ MOJOSHADER_glProgram *MOJOSHADER_glLinkProgram(MOJOSHADER_glShader *vshader, if (const_count > 0) { - retval->constants = (GLfloat *) Malloc(sizeof (GLfloat) * const_count); + retval->constants = (GLfloat *) Malloc(sizeof (GLfloat) * const_count * 4); if (retval->constants == NULL) goto link_program_fail; retval->constant_count = (uint32) const_count;