ncplane_as_rgba: nil geometry is any non-positive geometry

This commit is contained in:
nick black 2021-05-25 16:53:01 -04:00
parent de502655c2
commit ee140a24e2
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -2618,7 +2618,7 @@ uint32_t* ncplane_as_rgba(const ncplane* nc, ncblitter_e blit,
if(leny == -1){
leny = nc->leny - begy;
}
if(lenx < 0 || leny < 0){ // no need to draw zero-size object, exit
if(lenx <= 0 || leny <= 0){ // no need to draw zero-size object, exit
logerror(ncur, "Nil geometry (%dx%d)\n", leny, lenx);
return NULL;
}