Skip to content

Commit

Permalink
Prevent duplicate map sections in renderd.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
hummeltech committed Mar 26, 2024
1 parent 2ce51df commit f84ab75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/renderd_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ void process_map_sections(const char *config_file_name, xmlconfigitem *maps_dest
exit(7);
}

if (maps_dest[map_section_num].xmlname != NULL) {
g_logger(G_LOG_LEVEL_CRITICAL, "Duplicate map config section names for section %i: %s & %s", map_section_num, maps_dest[map_section_num].xmlname, section);
exit(7);
}

copy_string(section, &maps_dest[map_section_num].xmlname, XMLCONFIG_MAX);

process_config_int(ini, section, "aspectx", &maps_dest[map_section_num].aspect_x, 1);
Expand Down

0 comments on commit f84ab75

Please sign in to comment.