mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
Merge branch 'coverity-datetime' into 'master'
gdatetime: Widen a variable before multiplication See merge request GNOME/glib!1622
This commit is contained in:
commit
ab700f9c58
@ -598,7 +598,7 @@ ymd_to_days (gint year,
|
||||
{
|
||||
gint64 days;
|
||||
|
||||
days = (year - 1) * 365 + ((year - 1) / 4) - ((year - 1) / 100)
|
||||
days = ((gint64) year - 1) * 365 + ((year - 1) / 4) - ((year - 1) / 100)
|
||||
+ ((year - 1) / 400);
|
||||
|
||||
days += days_in_year[0][month - 1];
|
||||
|
Loading…
Reference in New Issue
Block a user