farver::encode_colour() needs to check for "empty" inputs (e.g., zero-row matrix or zero-length alpha) because C level encode_c() accesses, for example, REAL(alpha)[0] without checking.
Example that segfaults on one of my OS-R-version combinations (on other combinations I think it is just getting lucky):
farver::encode_colour()
needs to check for "empty" inputs (e.g., zero-row matrix or zero-length alpha) because C levelencode_c()
accesses, for example,REAL(alpha)[0]
without checking.Example that segfaults on one of my OS-R-version combinations (on other combinations I think it is just getting lucky):
Same comment applies to
farver::decode_colour()
presumably.