From 18d7d8d4cecaed1143b2e09b192b406762bf4c2f Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Thu, 26 Mar 2009 11:11:18 +0100 Subject: add height in search chooser --- src/choose_hill.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/choose_hill.cxx b/src/choose_hill.cxx index 9887f59..7f59d68 100644 --- a/src/choose_hill.cxx +++ b/src/choose_hill.cxx @@ -18,11 +18,15 @@ choose_hill(const Hills *hills, const char *l) { h_sort->sort_name(); for (int i=0; iget_num(); i++) { + char buf[256]; + Hill *m = h_sort->get(i); if (m->flags & (Hill::DUPLICATE | Hill::TRACK_POINT)) continue; - sc->add(m->name, m); + snprintf(buf, sizeof(buf) - 1, "%s (%dm)", m->name, (int) m->height); + buf[sizeof(buf) - 1] = '\0'; + sc->add(buf, m); } delete h_sort; -- cgit v1.2.3