Styken's fix for bug # 1035

Its a if to check for divide by 0 case.

Kent
This commit is contained in:
2004-03-02 16:49:50 +00:00
parent 056579b19c
commit 6ed91ce2ed

View File

@@ -1011,7 +1011,8 @@ static int calc_filesel_regel(SpaceFile *sfile, int nr, int *valx, int *valy)
/* amount of lines */
val= (textrct.ymax-textrct.ymin)/FILESEL_DY;
coll= nr/val;
if (val == 0) coll = 0;
else coll= nr/val;
nr -= coll*val;
*valy= textrct.ymax-FILESEL_DY+3 - nr*FILESEL_DY;