mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
cellRtcGetDaysInMonth: fix param check
This commit is contained in:
parent
0d7b7585a8
commit
f6af5ff13a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user