From 01e66b081842e318ac4738ad59cea5a492d786bf Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 27 Jan 2024 13:39:12 -1000 Subject: [PATCH] ALTAIRZ80: Properly check for failed return from time() API --- AltairZ80/s100_scp300f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AltairZ80/s100_scp300f.c b/AltairZ80/s100_scp300f.c index a2c49a50..64c084d5 100644 --- a/AltairZ80/s100_scp300f.c +++ b/AltairZ80/s100_scp300f.c @@ -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); }