From 267e85915af38fec4de3b624c27c0666694eaa5f Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Tue, 20 Mar 2018 11:19:07 -0400 Subject: [PATCH] Avoid overflow // FREEBIE --- SignalServiceKit/src/Util/NSDate+OWS.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SignalServiceKit/src/Util/NSDate+OWS.h b/SignalServiceKit/src/Util/NSDate+OWS.h index 338e9d205..6d3336abc 100755 --- a/SignalServiceKit/src/Util/NSDate+OWS.h +++ b/SignalServiceKit/src/Util/NSDate+OWS.h @@ -17,7 +17,9 @@ extern const NSTimeInterval kMonthInterval; #define kDayInMs (kHourInMs * 24) #define kWeekInMs (kDayInMs * 7) #define kMonthInMs (kDayInMs * 30) -#define kYearsInMs (kDayInMs * 365) + +// kYearsInMs is a double to avoid overflow +#define kYearsInMs (kDayInMs * 365.0) @interface NSDate (OWS)