Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Relation::members_str #305

Open
sulakm opened this issue Jul 8, 2024 · 0 comments
Open

Bug in Relation::members_str #305

sulakm opened this issue Jul 8, 2024 · 0 comments

Comments

@sulakm
Copy link

sulakm commented Jul 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant