Skip to content

Fix off-by-one-overrun of color table map array

Kenneth Moreland requested to merge kmorel/vtk-m:color-table-length-fix into master

The display of a color bar in an OpenGL canvas had an array overrun. This method first used ColorTable to create an array of colors. It then used the array to look up values for polygons that make up the color bar. However, each polygon used indices i and i+1, and on the last value the i+1 looked pass the end of the array. This fixes the problem by adding one more value to the color array generated.

Merge request reports

Loading