Real fix for Coverity 1372362.
authorwwp <wwp@free.fr>
Tue, 10 Jan 2017 08:36:31 +0000 (09:36 +0100)
committerwwp <wwp@free.fr>
Tue, 10 Jan 2017 08:36:31 +0000 (09:36 +0100)
src/plugins/vcalendar/day-view.c

index 553dc8f6bb376c649489e94597f70eb3b70c0f67..061da42665fc3b3e63cf20995b2b25d1bbd20822 100644 (file)
@@ -240,7 +240,7 @@ static void dw_summary_selected(GtkCMCTree *ctree, GtkCMCTreeNode *row,
                                localtime_r(&t_start, &tm_start);
                                if (tm_start.tm_hour > 2)
                                        gtk_adjustment_set_value(v_adj, 
-                                               ((v_adj->upper-v_adj->page_size)/(gdouble)(24/(tm_start.tm_hour-2))));
+                                               ((v_adj->upper-v_adj->page_size)/((gdouble)24/(gdouble)(tm_start.tm_hour-2))));
                                else
                                        gtk_adjustment_set_value(v_adj, 0);
                                gtk_adjustment_changed(v_adj);