From 0ce3e4ac416fd334ac667d45dae6bbdc25cc887a Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 26 Oct 2009 23:57:09 +0000 Subject: [PATCH] allocate much less memory for the ratio text --- macosx/NSStringAdditions.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/NSStringAdditions.m b/macosx/NSStringAdditions.m index f6b7db9af..d06c8fa4d 100644 --- a/macosx/NSStringAdditions.m +++ b/macosx/NSStringAdditions.m @@ -103,7 +103,7 @@ if (ratio == TR_RATIO_NA) return NSLocalizedString(@"N/A", "No Ratio"); - char buf[50]; + char buf[8]; return [NSString stringWithUTF8String: tr_strratio(buf, sizeof(buf), ratio, "\xE2\x88\x9E")]; } @@ -119,7 +119,7 @@ if (max > 0 && seconds >= (24 * 60 * 60)) { - NSUInteger days = remaining / (24 * 60 * 60); + const NSUInteger days = remaining / (24 * 60 * 60); if (days == 1) [timeArray addObject: NSLocalizedString(@"1 day", "time string")]; else -- 2.40.0