From e037ce41be333f2aa07ee87e7d006de0f1d25cf7 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 13 Oct 2015 12:08:55 -0400 Subject: [PATCH] Whoops, checked wrong variable here. Not that anything sane overflowed this. --- mojoshader_opengl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mojoshader_opengl.c b/mojoshader_opengl.c index 1d4b1d58..6e48751a 100644 --- a/mojoshader_opengl.c +++ b/mojoshader_opengl.c @@ -2141,7 +2141,7 @@ void MOJOSHADER_glGetVertexShaderUniformI(unsigned int idx, int *data, void MOJOSHADER_glSetVertexShaderUniformB(unsigned int idx, const int *data, unsigned int bcount) { - const uint maxregs = STATICARRAYLEN(ctx->vs_reg_file_f) / 4; + const uint maxregs = STATICARRAYLEN(ctx->vs_reg_file_b) / 4; if (idx < maxregs) { uint8 *wptr = ctx->vs_reg_file_b + idx; @@ -2156,7 +2156,7 @@ void MOJOSHADER_glSetVertexShaderUniformB(unsigned int idx, const int *data, void MOJOSHADER_glGetVertexShaderUniformB(unsigned int idx, int *data, unsigned int bcount) { - const uint maxregs = STATICARRAYLEN(ctx->vs_reg_file_f) / 4; + const uint maxregs = STATICARRAYLEN(ctx->vs_reg_file_b) / 4; if (idx < maxregs) { uint8 *rptr = ctx->vs_reg_file_b + idx; @@ -2224,7 +2224,7 @@ void MOJOSHADER_glGetPixelShaderUniformI(unsigned int idx, int *data, void MOJOSHADER_glSetPixelShaderUniformB(unsigned int idx, const int *data, unsigned int bcount) { - const uint maxregs = STATICARRAYLEN(ctx->ps_reg_file_f) / 4; + const uint maxregs = STATICARRAYLEN(ctx->ps_reg_file_b) / 4; if (idx < maxregs) { uint8 *wptr = ctx->ps_reg_file_b + idx; @@ -2239,7 +2239,7 @@ void MOJOSHADER_glSetPixelShaderUniformB(unsigned int idx, const int *data, void MOJOSHADER_glGetPixelShaderUniformB(unsigned int idx, int *data, unsigned int bcount) { - const uint maxregs = STATICARRAYLEN(ctx->ps_reg_file_f) / 4; + const uint maxregs = STATICARRAYLEN(ctx->ps_reg_file_b) / 4; if (idx < maxregs) { uint8 *rptr = ctx->ps_reg_file_b + idx;