File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ namespace osmium {
392
392
*m_out += " (open)\n " ;
393
393
}
394
394
395
- const int width = static_cast <int >(std::log10 (way.nodes ().size ())) + 1 ;
395
+ const int width = way. nodes (). size () <= 1 ? 1 : static_cast <int >(std::log10 (way.nodes ().size () - 1 )) + 1 ;
396
396
int n = 0 ;
397
397
for (const auto & node_ref : way.nodes ()) {
398
398
write_diff ();
@@ -427,7 +427,7 @@ namespace osmium {
427
427
output_int (relation.members ().size ());
428
428
*m_out += ' \n ' ;
429
429
430
- const int width = static_cast <int >(std::log10 (relation.members ().size ())) + 1 ;
430
+ const int width = relation. members (). size () <= 1 ? 1 : static_cast <int >(std::log10 (relation.members ().size () - 1 )) + 1 ;
431
431
int n = 0 ;
432
432
for (const auto & member : relation.members ()) {
433
433
write_diff ();
@@ -485,7 +485,7 @@ namespace osmium {
485
485
output_int (changeset.num_comments ());
486
486
*m_out += ' \n ' ;
487
487
488
- const int width = static_cast <int >(std::log10 (changeset.num_comments ())) + 1 ;
488
+ const int width = changeset. num_comments () <= 1 ? 1 : static_cast <int >(std::log10 (changeset.num_comments () - 1 )) + 1 ;
489
489
int n = 0 ;
490
490
for (const auto & comment : changeset.discussion ()) {
491
491
write_counter (width, n++);
You can’t perform that action at this time.
0 commit comments