Fix the rest of the id checks
authorzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 29 Oct 2007 07:17:09 +0000 (07:17 +0000)
committerzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 29 Oct 2007 07:17:09 +0000 (07:17 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@483 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/src/data/garmin/gar2navit.c

index 8dfc3f2..5660168 100644 (file)
@@ -249,7 +249,7 @@ int g2n_get_routable(struct gar2nav_conv *c, int type, unsigned short id)
 
        while (def) {
                if ((!def->maxid && def->id == id) || 
-                               (def->id <= id && def->maxid))
+                               (def->id <= id && id <= def->maxid))
                        return def->routable;
                def = def->next;
        }
@@ -272,7 +272,7 @@ char *g2n_get_descr(struct gar2nav_conv *c, int type, unsigned short id)
        }
        while (def) {
                if ((!def->maxid && def->id == id) || 
-                               (def->id <= id && def->maxid))
+                               (def->id <= id && id <= def->maxid))
                        return def->descr;
                def = def->next;
        }