From 9a8def667a19e74878f640b2c9cefcf16b259982 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sun, 26 Jan 2003 09:40:31 +0000 Subject: [PATCH] Some checking of input. --- gedcom/date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gedcom/date.c b/gedcom/date.c index 40cb18a..a485392 100644 --- a/gedcom/date.c +++ b/gedcom/date.c @@ -336,7 +336,7 @@ int numbers_to_strings(struct date *d) if (d->day != -1) sprintf(d->day_str, "%d", d->day); - if (d->month != -1) + if (d->month > 0 && d->month <= max_month[d->cal]) strcpy(d->month_str, month_name[d->cal][d->month - 1]); if (d->year_type == YEAR_SINGLE) -- 2.30.2