From: martin-s Date: Tue, 22 Jan 2008 19:33:08 +0000 (+0000) Subject: Fix:Core:Increase point limit, reduce route graph map clutter X-Git-Tag: navit-0.5.0.5194svn~4356 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21ea0ef0c561a364d950358c8a73e082cca4e8a5;p=profile%2Fivi%2Fnavit.git Fix:Core:Increase point limit, reduce route graph map clutter git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@795 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/src/route.c b/navit/src/route.c index 650fe27..6418acb 100644 --- a/navit/src/route.c +++ b/navit/src/route.c @@ -1003,17 +1003,18 @@ route_graph_update(struct route *this) struct street_data * street_get_data (struct item *item) { - struct coord c[1000]; + int maxcount=2000; + struct coord c[maxcount]; int count=0; struct street_data *ret; struct attr attr; - while (count < 1000) { + while (count < maxcount) { if (!item_coord_get(item, &c[count], 1)) break; count++; } - g_assert(count < 1000); + g_assert(count < maxcount); ret=g_malloc(sizeof(struct street_data)+count*sizeof(struct coord)); ret->item=*item; ret->count=count; @@ -1459,7 +1460,10 @@ rp_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) attr->type = attr_label; if (mr->str) g_free(mr->str); - mr->str=g_strdup_printf("%d", p->value); + if (p->value != INT_MAX) + mr->str=g_strdup_printf("%d", p->value); + else + mr->str=g_strdup("-"); attr->u.str = mr->str; mr->attr_next=attr_none; return 1;