Skip to content

Commit

Permalink
Merge pull request #4397 from Terr/fix-setting-date-to-december
Browse files Browse the repository at this point in the history
Make it possible to set date in December
  • Loading branch information
joncampbell123 committed Aug 6, 2023
2 parents eb722c8 + 103e9bb commit 66ec278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dos/dos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ static Bitu DOS_21Handler(void) {
if (reg_cx % 4 == 0 && (reg_cx % 100 != 0 || reg_cx % 400 == 0))
maxday[1]++;

if (reg_cx < 1980 || reg_cx > 9999 || reg_dh < 1 || reg_dh > 12 || reg_dl < 1 || reg_dl > maxday[reg_dh])
if (reg_cx < 1980 || reg_cx > 9999 || reg_dh < 1 || reg_dh > 12 || reg_dl < 1 || reg_dl > maxday[reg_dh - 1])
{
reg_al = 0xff; // error!
break; // done
Expand Down

0 comments on commit 66ec278

Please sign in to comment.