Whoops, checked wrong variable here. Not that anything sane overflowed this.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 13 Oct 2015 12:08:55 -0400
changeset 1149 265ab4117525
parent 1148 3a061cc281c2
child 1150 02c0f0afb39a
Whoops, checked wrong variable here. Not that anything sane overflowed this.
mojoshader_opengl.c
--- a/mojoshader_opengl.c	Tue Oct 06 07:22:47 2015 -0500
+++ b/mojoshader_opengl.c	Tue Oct 13 12:08:55 2015 -0400
@@ -2141,7 +2141,7 @@
 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_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_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_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;