Closed mattjvincent closed 6 months ago
Thanks @mattjvincent !
This error occurred because within C I was doing the equivalent of names(this_factor)[NA]
which attempts an out-of-bounds access to the names of the factor.
Fixed in https://github.com/coolbutuseless/yyjsonr/commit/431cca9cda350e5e4f7ab9ed2802a141a0013cb4
yyjsonr will cause a fatal error when a variable is declared as a factor, but the values do not match the specified levels.
The following example will crash the R session.
I also tried with a tibble.
Crashed on both Mac (M1, Sonoma) and Linux Rocky 9.