thread ‘main’ panicked at ‘attempt to calculate the remainder with a divisor of zero’: /home/cephd/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/cursive-0.15.0/src/backends/curses/mod.rs:93
It looks like it's due to this line:
Color::Light(BaseColor::Black) => 8 % max_colors,
It appears that the max_colors value is being sourced from ncurses::COLORS(), which I can only assume is returning 0 for whatever reason.
Since the rest of the code looks as though it is written to assume at least 8 colors, this PR puts a lower bound of 8 on max_colors to prevent this panic.
Also happy to implement a different solution if you prefer!
Reported at: https://forum.grin.mw/t/failed-to-start-a-new-grin-node/8413
I filed https://github.com/gyscos/cursive/pull/565 (xposted below) and will move this forward when that gets merged and published.