Cleanup: replace magic number
authorCampbell Barton <ideasman42@gmail.com>
Tue, 11 Sep 2018 04:31:19 +0000 (14:31 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 11 Sep 2018 04:31:19 +0000 (14:31 +1000)
source/blender/editors/interface/interface_widgets.c

index 004cdeb8d53209e5f814cdbbe7a324f8677c9d22..661de5c344bb943b92c05217e081725c314c7098 100644 (file)
@@ -1171,7 +1171,7 @@ static void draw_widgetbase_batch(GPUBatch *batch, uiWidgetBase *wtb)
                float checker_params[3] = {UI_ALPHA_CHECKER_DARK / 255.0f, UI_ALPHA_CHECKER_LIGHT / 255.0f, 8.0f};
                /* draw single */
                GPU_batch_program_set_builtin(batch, GPU_SHADER_2D_WIDGET_BASE);
-               GPU_batch_uniform_4fv_array(batch, "parameters", 11, (float *)&wtb->uniform_params);
+               GPU_batch_uniform_4fv_array(batch, "parameters", MAX_WIDGET_PARAMETERS, (float *)&wtb->uniform_params);
                GPU_batch_uniform_3fv(batch, "checkerColorAndSize", checker_params);
                GPU_batch_draw(batch);
        }