From 6ab325a36e8fc2c4736f0e01af89dc3d06ff99a9 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 20 Mar 2021 02:08:06 -0400 Subject: [PATCH] [tinfo] zero out sixel_maxx/sixel_maxy --- src/lib/terminfo.c | 4 ++-- src/poc/pixel.c | 2 +- src/tests/pixel.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/terminfo.c b/src/lib/terminfo.c index 6b9cacc39..73ffb5ec2 100644 --- a/src/lib/terminfo.c +++ b/src/lib/terminfo.c @@ -346,8 +346,8 @@ query_sixel(tinfo* ti, int fd){ ti->sixel_supported = true; ti->color_registers = 256; // assumed default [shrug] ti->pixel_destroy = sprite_sixel_annihilate; -// ti->sixel_maxx = ti->sixel_maxy = 0; - } // FIXME else warning? + ti->sixel_maxx = ti->sixel_maxy = 0; + } } break; case DONE: diff --git a/src/poc/pixel.c b/src/poc/pixel.c index 7b70c2100..f4047440e 100644 --- a/src/poc/pixel.c +++ b/src/poc/pixel.c @@ -48,7 +48,7 @@ int main(int argc, char** argv){ .margin_r = 2, }; struct notcurses* nc = notcurses_init(&opts, NULL); - if(!notcurses_check_pixel_support(nc)){ + if(notcurses_check_pixel_support(nc) <= 0){ notcurses_stop(nc); fprintf(stderr, "this program requires pixel graphics support\n"); return EXIT_FAILURE; diff --git a/src/tests/pixel.cpp b/src/tests/pixel.cpp index 83a868fce..56bd34c25 100644 --- a/src/tests/pixel.cpp +++ b/src/tests/pixel.cpp @@ -8,7 +8,7 @@ TEST_CASE("Pixel") { auto n_ = notcurses_stdplane(nc_); REQUIRE(n_); - if(!notcurses_check_pixel_support(nc_)){ + if(notcurses_check_pixel_support(nc_) <= 0){ CHECK(!notcurses_stop(nc_)); return; }