Fixed underallocation bug. trunk
authorRyan C. Gordon <icculus@icculus.org>
Sat, 10 May 2008 23:11:18 -0400
branchtrunk
changeset 312 a5c140ca79d4
parent 311 f4586d297d3b
child 313 f5aa15de1690
Fixed underallocation bug. Constants are vec4, not float!
mojoshader_opengl.c
--- a/mojoshader_opengl.c	Sat May 10 21:50:21 2008 -0400
+++ b/mojoshader_opengl.c	Sat May 10 23:11:18 2008 -0400
@@ -695,7 +695,7 @@
 
     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;