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:
@@ -607,7 +607,7 @@ int days_since_1980(void) {
|
||||
|
||||
local_now = mktime(¤tTime);
|
||||
|
||||
if (time(&local_now) == -1) return 0;
|
||||
if (time(&local_now) == (time_t)-1) return 0;
|
||||
|
||||
return (int)floor(difftime(local_now, jan1980) / 86400);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user