Skip to content

Commit

Permalink
Fixed underallocation bug.
Browse files Browse the repository at this point in the history
Constants are vec4, not float!

--HG--
branch : trunk
  • Loading branch information
icculus committed May 11, 2008
1 parent f77d311 commit 66bc6a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader_opengl.c
Expand Up @@ -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;
Expand Down

0 comments on commit 66bc6a5

Please sign in to comment.