slang: Fix allocation size.

We don't need 16K+ to store a single pointer.
This commit is contained in:
Michal Krol 2009-11-24 11:22:03 +01:00
parent 53d9b7d361
commit bae9ece685

View file

@ -81,8 +81,8 @@ new_subroutine(slang_emit_info *emitInfo, GLuint *id)
emitInfo->Subroutines = (struct gl_program **)
_mesa_realloc(emitInfo->Subroutines,
n * sizeof(struct gl_program),
(n + 1) * sizeof(struct gl_program));
n * sizeof(struct gl_program *),
(n + 1) * sizeof(struct gl_program *));
emitInfo->Subroutines[n] = ctx->Driver.NewProgram(ctx, emitInfo->prog->Target, 0);
emitInfo->Subroutines[n]->Parameters = emitInfo->prog->Parameters;
emitInfo->NumSubroutines++;