From c7c102e39f962fe761fadda0cfefe34f4fac467f Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 19 Sep 2009 23:44:57 +0000 Subject: [PATCH] #2428 fix a crash in TorrentTableView when drawing alternative rows --- macosx/TorrentTableView.m | 2 +- macosx/TrackerTableView.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index 3ff88f19d..1ed69b26e 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -680,7 +680,7 @@ const CGFloat totalRowHeight = [self rowHeight] + [self intercellSpacing].height; - NSRect gridRects[(NSInteger)(ceil(visibleRect.size.height / totalRowHeight / 2.0))]; + NSRect gridRects[(NSInteger)(ceil(visibleRect.size.height / totalRowHeight / 2.0)) + 1]; //add one if partial rows at top and bottom NSInteger rectNum = 0; if (rows.length > 0) diff --git a/macosx/TrackerTableView.m b/macosx/TrackerTableView.m index 70291ec8e..09b7d1368 100644 --- a/macosx/TrackerTableView.m +++ b/macosx/TrackerTableView.m @@ -46,7 +46,7 @@ const CGFloat totalRowHeight = [self rowHeight] + [self intercellSpacing].height; - NSRect gridRects[(NSInteger)(ceil(visibleRect.size.height / totalRowHeight / 2.0))]; + NSRect gridRects[(NSInteger)(ceil(visibleRect.size.height / totalRowHeight / 2.0)) + 1]; //add one if partial rows at top and bottom NSInteger rectNum = 0; if (rows.length > 0)