Skip to content

Revert "Reduce the number of colors to speed up test execution."

Reverting to avoid an out-of-bounds access of the colors array. These additional colors were used in t_tsrccoords.

This reverts commit cadf1d2f.


Found by ASan. Here's what's happening:

static int dot_colors[5][5] = {
        {7, 7, 7, 7, 7},
        {7, 7, 7, 7, 7},
        {7, 0, 7, 7, 7},
        {7, 7, 7, 7, 7},
        {7, 7, 7, 7, 7},
};

color4d colors[] = {
        {1.0, 1.0, 1.0, 1.0},
        {1.0, 0, 0, 1.0},
        {0, 1.0, 0, 1.0},
        {0, 0, 1.0, 1.0},
        {0.5, 0, 0, .5},
};

                color4d *c = &colors[dot_colors[y][x]];
Edited by Jeremy Huddleston Sequoia

Merge request reports

Loading