From b6048d322065ef2715b88970c1c08bc414110784 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 6 Apr 2008 14:47:26 +0000 Subject: [PATCH] fix speeds of -0.01 --- macosx/NSStringAdditions.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macosx/NSStringAdditions.m b/macosx/NSStringAdditions.m index c6de97e7d..107d5f04f 100644 --- a/macosx/NSStringAdditions.m +++ b/macosx/NSStringAdditions.m @@ -78,7 +78,7 @@ + (NSString *) stringForSpeedAbbrev: (float) speed { if (speed < 1000.0) //0.0 K to 999.9 K - return [NSString localizedStringWithFormat: @"%.1f K", speed - .05]; + return [NSString localizedStringWithFormat: @"%.1f K", MAX(0.0, speed - .05)]; else if (speed < 102400.0) //0.98 M to 99.99 M return [NSString localizedStringWithFormat: @"%.2f M", (speed / 1024.0) - .005]; else if (speed < 1024000.0) //100.0 M to 999.9 M