ref: 87c8306193fc056112849da2adc5a051ca4e4173
parent: 735386bc7b36f82ab64d7fff1ce6300de0bf070e
author: mischief <mischief@offblast.org>
date: Wed Jan 8 15:52:40 EST 2014
winwatch: prevent divide by zero if the window height is too small
--- a/sys/src/cmd/winwatch.c
+++ b/sys/src/cmd/winwatch.c
@@ -188,6 +188,8 @@
z = 0;
rows = (Dy(screen->r)-2*MARGIN+PAD)/(font->height+PAD);
+ if(rows == 0)
+ rows = 1;
if(rows*cols < nwin || rows*cols >= nwin*2){ncols = nwin <= 0 ? 1 : (nwin+rows-1)/rows;
if(ncols != cols){--
⑨