Only return RTC page if not changeable pages are requested (#731)

This commit is contained in:
Uwe Seimet 2022-03-14 01:45:52 +01:00 committed by GitHub
parent 8f90ce4649
commit 08156f763f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,9 +169,9 @@ void HostServices::AddModePages(map<int, vector<BYTE>>& pages, int page, bool ch
void HostServices::AddRealtimeClockPage(map<int, vector<BYTE>>& pages, bool changeable) const
{
if (!changeable) {
vector<BYTE> buf(10);
if (!changeable) {
// Data structure version 1.0
buf[2] = 0x01;
buf[3] = 0x00;
@ -185,7 +185,7 @@ void HostServices::AddRealtimeClockPage(map<int, vector<BYTE>>& pages, bool chan
buf[8] = tm.tm_min;
// Ignore leap second for simplicity
buf[9] = tm.tm_sec < 60 ? tm.tm_sec : 59;
}
pages[32] = buf;
}
}