reel: cap return lines at max size, warn on excess

pull/1037/head
nick black 4 years ago
parent bf40e163c8
commit c2c4811053
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -288,6 +288,10 @@ ncreel_draw_tablet(const ncreel* nr, nctablet* t, int frontiertop,
//fprintf(stderr, "calling! lenx/leny: %d/%d cbx/cby: %d/%d cblenx/cbleny: %d/%d dir: %d\n", lenx, leny, cbx, cby, cblenx, cbleny, direction);
int ll = t->cbfxn(t, direction == DIRECTION_DOWN);
//fprintf(stderr, "RETURNRETURNRETURN %p %d (%d, %d, %d) DIR %d\n", t, ll, cby, cbleny, leny, direction);
if(ll > cbleny){
logwarn(nr->p->nc, "Tablet callback returned %d lines, %d allowed\n", ll, cbleny);
ll = cbleny;
}
if(ll != cbleny){
int diff = cbleny - ll;
//fprintf(stderr, "resizing data plane %d->%d\n", cbleny, leny - diff);

Loading…
Cancel
Save