[evolution-mapi] Fix rounding issue with convert from double to int



commit 92230660b650202d4585bf055c93eddba15e3cf4
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jun 2 17:03:01 2010 +0200

    Fix rounding issue with convert from double to int

 src/libexchangemapi/exchange-mapi-cal-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libexchangemapi/exchange-mapi-cal-utils.c b/src/libexchangemapi/exchange-mapi-cal-utils.c
index f8ffcc6..8a61a02 100644
--- a/src/libexchangemapi/exchange-mapi-cal-utils.c
+++ b/src/libexchangemapi/exchange-mapi-cal-utils.c
@@ -895,7 +895,7 @@ exchange_mapi_cal_util_mapi_props_to_comp (ExchangeMapiConnection *conn, icalcom
 
 		complete = (const double *)find_mapi_SPropValue_data(properties, PROP_TAG(PT_DOUBLE, 0x8102));
 		if (complete) {
-			prop = icalproperty_new_percentcomplete ((gint)(*complete * 100));
+			prop = icalproperty_new_percentcomplete ((gint)(*complete * 100 + 1e-9));
 			icalcomponent_add_property (ical_comp, prop);
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]