Skip to content

Commit

Permalink
Sanity Check
Browse files Browse the repository at this point in the history
  • Loading branch information
oshaboy committed Nov 4, 2023
1 parent 73d9262 commit 6ee8089
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/chafa/character_canvas_to_conhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ gsize canvas_to_conhost(ChafaCanvas * canvas, CONHOST_LINE ** lines){
ChafaCanvasConfig * config;
ChafaCanvasMode canvas_mode;

if (
canvas_mode == CHAFA_CANVAS_MODE_INDEXED_240 ||
canvas_mode == CHAFA_CANVAS_MODE_INDEXED_256 ||
canvas_mode == CHAFA_CANVAS_MODE_TRUECOLOR
) return (gsize) -1;

config = chafa_canvas_peek_config(canvas);
canvas_mode = chafa_canvas_config_get_canvas_mode(config);
chafa_canvas_config_get_geometry(config, &width, &height);
Expand Down

0 comments on commit 6ee8089

Please sign in to comment.