Closed dcooley closed 3 years ago
running all_palettes[1:7]
breaks on 7th item
running all_palettes[2:7]
is fine
running all_palettes[2:8]
breaks on 8th item (7th really, starting from 2)
putting an rm(res)
doesn't help.
ok, the 256-length vectors were initialised, but not always filled, because some palettes are only 9 rows.
Fixed by not initialising with a length, and only initialising the output matrix after the RGB vectors have been allocated.
Reported from cran
Reproducible using wch/r-devel docker image, found in amongst these tests