From 017877fc8eda7b3685ab43dfa519d6f8050ac529 Mon Sep 17 00:00:00 2001 From: kazer_ Date: Sun, 7 Sep 2014 19:06:38 +0000 Subject: Fix:maptool:Fixed use of maptool with slices > 32GB, closes #1249|Thanks Tryagain! git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5890 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/maptool/osm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'navit/maptool') diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c index 4cb8c7bcf..9c3de0d2c 100644 --- a/navit/maptool/osm.c +++ b/navit/maptool/osm.c @@ -1365,13 +1365,13 @@ clear_node_item_buffer(void) } } -static int +static long long node_item_find_index_in_ordered_list(osmid id) { struct node_item *node_buffer_base=(struct node_item *)(node_buffer.base); - int node_count=node_buffer.size/sizeof(struct node_item); - int search_step=node_count>4 ? node_count/4 : 1; - int search_index=node_count/2; + long long node_count=node_buffer.size/sizeof(struct node_item); + long long search_step=node_count>4 ? node_count/4 : 1; + long long search_index=node_count/2; if (node_buffer_base[0].id > id) return -1; if (node_buffer_base[node_count-1].id < id) @@ -1414,7 +1414,7 @@ static struct node_item * node_item_get(osmid id) { struct node_item *node_buffer_base=(struct node_item *)(node_buffer.base); - int result_index; + long long result_index; if (node_hash) { // Use g_hash_table_lookup_extended instead of g_hash_table_lookup // to distinguish a key with a value 0 from a missing key. -- cgit v1.2.1