diff --git a/src/demo/luigi.c b/src/demo/luigi.c index 896c1b03f..28e4cd430 100644 --- a/src/demo/luigi.c +++ b/src/demo/luigi.c @@ -171,7 +171,7 @@ int luigi_demo(struct notcurses* nc){ for(i = 0 ; i < 3 ; ++i){ lns[i] = ncplane_new(nc, height, 16, yoff, 0, NULL); if(lns[i] == NULL){ - while(--i){ + while(i--){ ncplane_destroy(lns[i]); } return -1;