From bf9199b4efb2e11e14efb78219edd46bc78ec85c Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Wed, 1 Sep 2021 12:59:18 +0200 Subject: [PATCH] Fix C library f2cal() date function to extend year range to 2155. --- src/clib/date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clib/date.c b/src/clib/date.c index 0b74d78a..d564ef90 100644 --- a/src/clib/date.c +++ b/src/clib/date.c @@ -74,7 +74,7 @@ int cal2u (cd) cal *cd; f2cal (fdate, cd) cal *cd; - {cd->year = 1900 + ((fdate>>27) & 0177); + {cd->year = 1900 + ((fdate>>27) & 0377); if ((cd->month = (fdate>>23) & 017) > 12) cd->month = 0; cd->day = (fdate>>18) & 037; fdate = (fdate & 0777777) >> 1;