From e3bd0f0ec73d93931749bf85a7b149b37aff8705 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sat, 22 Mar 2008 18:22:10 +0000 Subject: [PATCH] use correct value in sizeof --- macosx/Torrent.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index b9b54e735..a51fbec8f 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1382,7 +1382,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * - (void) setFileCheckState: (int) state forIndexes: (NSIndexSet *) indexSet { NSUInteger count = [indexSet count], i = 0, index; - tr_file_index_t * files = malloc(count * sizeof(int)); + tr_file_index_t * files = malloc(count * sizeof(tr_file_index_t)); for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index]) { files[i] = index; @@ -1399,7 +1399,7 @@ void completenessChangeCallback(tr_torrent * torrent, cp_status_t status, void * - (void) setFilePriority: (int) priority forIndexes: (NSIndexSet *) indexSet { NSUInteger count = [indexSet count], i = 0, index; - tr_file_index_t * files = malloc(count * sizeof(int)); + tr_file_index_t * files = malloc(count * sizeof(tr_file_index_t)); for (index = [indexSet firstIndex]; index != NSNotFound; index = [indexSet indexGreaterThanIndex: index]) { files[i] = index;