Tuesday, January 06, 2009

Spot the defect!

From this zuneboards post, the Zune New Year's bug. Can you spot what is wrong? :P


year = ORIGINYEAR; /* = 1980 */

while (days > 365)
{
if (IsLeapYear(year))
{
if (days > 366)
{
days -= 366;
year += 1;
}
}
else
{
days -= 365;
year += 1;
}
}

No comments: