Skip to content

Bug in Relation::members_str #305

Open
@sulakm

Description

@sulakm

Hi, there is a bug in method Relation::members_str.

If m_WayRefs is empty, string is written at negative index. This bug causes crash after adding restriction tag for relation element into configuration xml.

Minimalist fix would be adding space into std::string way_list("");

More efficient fix is replacing way_list[way_list.size() -1] = ' '; with this:

	size_t n = way_list.size();
	if (n > 0) way_list.resize(n - 1);

Cheers, Martin

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions