From: Peter Verthez Date: Sun, 26 Jan 2003 09:40:31 +0000 (+0000) Subject: Some checking of input. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;ds=sidebyside;h=9a8def667a19e74878f640b2c9cefcf16b259982;p=gedcom-parse.git Some checking of input. --- 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)