bug 370390: caldatetime.SubtractDate fails with negative numbers. r=dbo

This commit is contained in:
mvl%exedo.nl 2007-02-14 17:00:10 +00:00
Родитель 95fb1609fa
Коммит c3c336ec97
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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)