bug 370390: caldatetime.SubtractDate fails with negative numbers. r=dbo
This commit is contained in:
Родитель
95fb1609fa
Коммит
c3c336ec97
|
@ -291,7 +291,7 @@ calDateTime::SubtractDate(calIDateTime *aDate, calIDuration **aDuration)
|
|||
// for a duration, need to convert the difference in microseconds (prtime)
|
||||
// to seconds (libical), so divide by one million.
|
||||
icaldurationtype idt =
|
||||
icaldurationtype_from_int(NS_STATIC_CAST(int, (mNativeTime - t2t) / PR_USEC_PER_SEC));
|
||||
icaldurationtype_from_int(NS_STATIC_CAST(int, (mNativeTime - t2t) / PRInt64(PR_USEC_PER_SEC)));
|
||||
|
||||
nsCOMPtr<calIDuration> result(do_CreateInstance("@mozilla.org/calendar/duration;1"));
|
||||
if (!result)
|
||||
|
|
Загрузка…
Ссылка в новой задаче