Some checking of input.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 26 Jan 2003 09:40:31 +0000 (09:40 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 26 Jan 2003 09:40:31 +0000 (09:40 +0000)
gedcom/date.c

index 40cb18a7115eca0c5a86f2600e6c73b54b311dee..a4853925294f2424f083aec639c152096fd51fc3 100644 (file)
@@ -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)