Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: holiday calculation failed on last day of Islamic leap year
On a leap year in the Islamic calendar, there are 355 days, and today happens to have been the first 355th day of the year since this holiday calculation was introduced. This exposed a condition triggering one of the impossible() calls: the computation of which month it was did not consider the possibility of extending the last month by an extra day. Fix it by accounting for that, and also strengthen the error check in case it winds up at an even more out-of-bounds month somehow. There don't happen to be any holidays xNetHack recognizes on the last day of the year, so this didn't have any impact beyond the error message.