mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Don't trust the returned date/time from the BIOS. QEmu messes this up sometimes.
Partly fixes bug 716. svn path=/trunk/; revision=17767
This commit is contained in:
parent
187b9e3939
commit
ae5de0886a
1 changed files with 6 additions and 0 deletions
|
@ -403,6 +403,12 @@ VOID TuiUpdateDateTime(VOID)
|
|||
BOOL PMHour = FALSE;
|
||||
|
||||
MachRTCGetCurrentDateTime(&Year, &Month, &Day, &Hour, &Minute, &Second);
|
||||
if (Year < 1 || 9999 < Year || Month < 1 || 12 < Month || Day < 1 ||
|
||||
31 < Day || 23 < Hour || 59 < Minute || 59 < Second)
|
||||
{
|
||||
/* This happens on QEmu sometimes. We just skip updating */
|
||||
return;
|
||||
}
|
||||
// Get the month name
|
||||
strcpy(DateString, UiMonthNames[Month - 1]);
|
||||
// Get the day
|
||||
|
|
Loading…
Reference in a new issue