mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
cellRtcGetDaysInMonth: fix param check
This commit is contained in:
parent
0d7b7585a8
commit
f6af5ff13a
1 changed files with 2 additions and 2 deletions
|
@ -1457,7 +1457,7 @@ error_code cellRtcGetDaysInMonth(s32 year, s32 month)
|
||||||
{
|
{
|
||||||
cellRtc.todo("cellRtcGetDaysInMonth(year=%d, month=%d)", year, 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;
|
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 + 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)
|
error_code cellRtcGetDayOfWeek(s32 year, s32 month, s32 day)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue