Skip to content

Commit

Permalink
Whoops, checked wrong variable here. Not that anything sane overflowe…
Browse files Browse the repository at this point in the history
…d this.
  • Loading branch information
icculus committed Oct 13, 2015
1 parent 9c1a446 commit e037ce4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mojoshader_opengl.c
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit e037ce4

Please sign in to comment.