X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gedcom%2Fdate.c;h=4f9878fb624553fd7255fce6ad84a1bcf15b86da;hb=000f15140c4e0f209994cdc579a677e29ae3e807;hp=40cb18a7115eca0c5a86f2600e6c73b54b311dee;hpb=31fb8432ef01f9d5a08cc801a785a07b4e9d12bd;p=gedcom-parse.git diff --git a/gedcom/date.c b/gedcom/date.c index 40cb18a..4f9878f 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) @@ -409,8 +409,8 @@ struct date_value gedcom_parse_date(const char* line_value) init_date(&def_date); curr_line_value = line_value; if (compat_mode(C_NO_REQUIRED_VALUES) - && !strncmp(curr_line_value, "-", 2)) { - gedcom_date_error(_("Empty value changed to '-'")); + && !strncmp(curr_line_value, VALUE_IF_MISSING, 2)) { + gedcom_date_error(_("Empty value changed to '%s'"), VALUE_IF_MISSING); result = 1; } else {