1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

cellRtcGetDaysInMonth: fix param check

This commit is contained in:
Megamouse 2021-11-15 18:26:57 +01:00
parent 0d7b7585a8
commit f6af5ff13a

View File

@ -1457,7 +1457,7 @@ error_code cellRtcGetDaysInMonth(s32 year, s32 month)
{
cellRtc.todo("cellRtcGetDaysInMonth(year=%d, month=%d)", year, month);
if ((year < 0) || (month < 0) || (month > 12))
if ((year < 0) || (month <= 0) || (month > 12))
{
return CELL_RTC_ERROR_INVALID_ARG;
}
@ -1467,7 +1467,7 @@ error_code cellRtcGetDaysInMonth(s32 year, s32 month)
return not_an_error(DAYS_IN_MONTH[month + 11]);
}
return not_an_error(DAYS_IN_MONTH[month + -1]);
return not_an_error(DAYS_IN_MONTH[month - 1]);
}
error_code cellRtcGetDayOfWeek(s32 year, s32 month, s32 day)