projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
187b9e3
)
Don't trust the returned date/time from the BIOS. QEmu messes this up sometimes.
author
Gé van Geldorp
<ge@gse.nl>
Fri, 9 Sep 2005 21:15:32 +0000
(21:15 +0000)
committer
Gé van Geldorp
<ge@gse.nl>
Fri, 9 Sep 2005 21:15:32 +0000
(21:15 +0000)
Partly fixes bug 716.
svn path=/trunk/; revision=17767
reactos/boot/freeldr/freeldr/ui/tui.c
patch
|
blob
|
history
diff --git
a/reactos/boot/freeldr/freeldr/ui/tui.c
b/reactos/boot/freeldr/freeldr/ui/tui.c
index
3938aab
..
6cd5397
100644
(file)
--- a/
reactos/boot/freeldr/freeldr/ui/tui.c
+++ b/
reactos/boot/freeldr/freeldr/ui/tui.c
@@
-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