Ticket #397: osm2navit.c.diff

File osm2navit.c.diff, 517 bytes (added by hgavin, 12 years ago)

Fix for infinite loop in osm2navit.c

  • navit/osm2navit.c

     
    12151215        int count=node_buffer.size/sizeof(struct node_item);
    12161216        int interval=count/4;
    12171217        int p=count/2;
     1218        if(interval==0) {
     1219                // If fewer than 4 nodes defined so far set interval to 1 to
     1220                // avoid infinite loop
     1221                interval = 1;
     1222        }
    12181223        if (node_hash) {
    12191224                int i;
    12201225                i=(int)(long)(g_hash_table_lookup(node_hash, (gpointer)(long)id));