1
0
mirror of https://github.com/simh/simh.git synced 2026-02-26 16:54:22 +00:00

ALTAIRZ80: Properly check for failed return from time() API

This commit is contained in:
Mark Pizzolato
2024-01-27 13:39:12 -10:00
parent 493a58b4bf
commit 01e66b0818

View File

@@ -607,7 +607,7 @@ int days_since_1980(void) {
local_now = mktime(&currentTime);
if (time(&local_now) == -1) return 0;
if (time(&local_now) == (time_t)-1) return 0;
return (int)floor(difftime(local_now, jan1980) / 86400);
}