diff options
Diffstat (limited to 'src/DuetNG/Webserver.cpp')
-rw-r--r-- | src/DuetNG/Webserver.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/DuetNG/Webserver.cpp b/src/DuetNG/Webserver.cpp index 0b949c1f..5f67e9f2 100644 --- a/src/DuetNG/Webserver.cpp +++ b/src/DuetNG/Webserver.cpp @@ -544,6 +544,7 @@ bool Webserver::ProcessFirstFragment(HttpSession& session, const char* command, if (timeVal != nullptr && !platform->IsDateTimeSet()) { struct tm timeInfo; + memset(&timeInfo, 0, sizeof(timeInfo)); if (strptime(timeVal, "%Y-%m-%dT%H:%M:%S", &timeInfo) != nullptr) { time_t newTime = mktime(&timeInfo); @@ -623,6 +624,7 @@ bool Webserver::ProcessFirstFragment(HttpSession& session, const char* command, // Try to obtain the last modified time time_t fileLastModified = 0; struct tm timeInfo; + memset(&timeInfo, 0, sizeof(timeInfo)); if (timeVal != nullptr && strptime(timeVal, "%Y-%m-%dT%H:%M:%S", &timeInfo) != nullptr) { fileLastModified = mktime(&timeInfo); |