Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…l?id=39555

Comment out bogus code.
  • Loading branch information
kevinbackhouse committed Oct 10, 2021
1 parent d874f3d commit c6ad0d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xmpsdk/src/XMPUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,11 @@ static bool
IsLeapYear ( long year )
{

// Fix for https://github.com/Exiv2/exiv2/issues/1954:
// This code looks bogus, and it can also cause an integer overflow, so comment it out.
#if 0
if ( year < 0 ) year = -year + 1; // Fold the negative years, assuming there is a year 0.

#endif
if ( (year % 4) != 0 ) return false; // Not a multiple of 4.
if ( (year % 100) != 0 ) return true; // A multiple of 4 but not a multiple of 100.
if ( (year % 400) == 0 ) return true; // A multiple of 400.
Expand Down

0 comments on commit c6ad0d9

Please sign in to comment.