Fix for smp4.smp
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 2 Jan 2006 18:43:06 +0000 (18:43 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 2 Jan 2006 18:43:06 +0000 (18:43 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@50 ffa7fe5e-494d-0410-b361-a75ebd5db220

README
src/block.c

diff --git a/README b/README
index a87097d..6507c9a 100644 (file)
--- a/README
+++ b/README
@@ -37,8 +37,6 @@ Compile unshield from http://synce.sourceforge.net/synce/unshield.php
 run "unshield x <path to your dvd>/travel/data2.cab" where the map
 should go (about 4.3 GB)
 export MAP_DATA=<path to where the map has been unshielded>/DIRMAP_MAP/DIE.map
-move smp4.smp from DIE.map to a higher directory, since it currently
-crashes the program.
 
 
 GPS Support:
index f9ee2e9..9a75536 100644 (file)
@@ -95,15 +95,17 @@ block_binarytree_walk(struct block **block, unsigned char **p, struct coord *c,
        if (val != -1) {
                dx=c[1].x-c[0].x;
                dy=c[0].y-c[1].y;
-               if (dy > dx) {
-                       ca[0].y=val;
-                       cb[1].y=val+1;
-               } else {
-                       ca[1].x=val;
-                       cb[0].x=val+1;          
+               if (dx > 0 && dy > 0) {
+                       if (dy > dx) {
+                               ca[0].y=val;
+                               cb[1].y=val+1;
+                       } else {
+                               ca[1].x=val;
+                               cb[0].x=val+1;          
+                       }
+                       ret+=block_binarytree_walk(block, p, ca, ign, blk_inf, t, data, func);
+                       ret+=block_binarytree_walk(block, p, cb, ign, blk_inf, t, data, func);
                }
-               ret+=block_binarytree_walk(block, p, ca, ign, blk_inf, t, data, func);
-               ret+=block_binarytree_walk(block, p, cb, ign, blk_inf, t, data, func);
        }
        return ret;
 }