diff options
Diffstat (limited to 'src/alf.c')
| -rw-r--r-- | src/alf.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -108,6 +108,11 @@ unsigned long get_msdos_date_time(void) { else tm = localtime(&t); + /* use a 0 timestamp if the year's out of range, unalf will + display it as <none>. */ + if(tm->tm_year < 1980 || tm->tm_year > 2107) + return 0; + msdos_year = tm->tm_year + 1900 - 1980; /* tm_mon + 1 because MS uses 1-12 for months, and struct tm uses 0-11 */ |
