Skip to content

Commit

Permalink
Fix exporting/importing requests on scenario events
Browse files Browse the repository at this point in the history
Fix missing "AD" on request dates on scenario events
  • Loading branch information
crudelios committed Feb 3, 2025
1 parent 8278f2b commit 87a6075
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/scenario/event/export_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ static int export_parse_attribute(xml_data_attribute_t *attr, int target)
return export_attribute_by_type(attr, attr->type, target);
case PARAMETER_TYPE_BUILDING_COUNTING:
return export_attribute_by_type(attr, PARAMETER_TYPE_BUILDING, target);
case PARAMETER_TYPE_REQUEST:
return export_attribute_number(attr, target);
case PARAMETER_TYPE_FUTURE_CITY:
return export_attribute_future_city(attr, target);
case PARAMETER_TYPE_MIN_MAX_NUMBER:
Expand Down
1 change: 1 addition & 0 deletions src/scenario/event/import_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ static int xml_import_special_parse_attribute(xml_data_attribute_t *attr, int *t
return xml_import_special_parse_building_counting(attr, target);
case PARAMETER_TYPE_FUTURE_CITY:
return xml_import_special_parse_future_city(attr, target);
case PARAMETER_TYPE_REQUEST:
case PARAMETER_TYPE_NUMBER:
return xml_import_special_parse_limited_number(attr, target);
case PARAMETER_TYPE_MIN_MAX_NUMBER:
Expand Down
2 changes: 1 addition & 1 deletion src/scenario/event/parameter_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ static uint8_t *string_from_year(uint8_t *dst, int year, int *maxlength)
cursor++;
cursor = string_copy(lang_get_string(20, 1), cursor, *maxlength - 10);
} else {
string_copy(lang_get_string(20, 1), cursor, *maxlength - 10);
cursor = string_copy(lang_get_string(20, 1), cursor, *maxlength - 10);
*cursor = ' ';
cursor++;
cursor += string_from_int(cursor, year, 0);
Expand Down

0 comments on commit 87a6075

Please sign in to comment.