diff options
author | Michael Dankov <tryagain@navit-project.org> | 2016-08-26 19:20:18 +0300 |
---|---|---|
committer | Michael Dankov <tryagain@navit-project.org> | 2016-08-26 19:20:18 +0300 |
commit | 4ed691696de132289e4023e2fbd7e7854d78c88b (patch) | |
tree | e5c735ad45ea52fff91ba6b2f2799625f3f134a3 | |
parent | 6894437901ac411c25aebea9259a16163aed06c4 (diff) | |
download | navit-4ed691696de132289e4023e2fbd7e7854d78c88b.tar.gz |
fix:maptool:properly check node reference markR6739
-rw-r--r-- | navit/maptool/osm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/navit/maptool/osm.c b/navit/maptool/osm.c index 59518d620..b5c72e7d9 100644 --- a/navit/maptool/osm.c +++ b/navit/maptool/osm.c @@ -126,7 +126,8 @@ char *osm_types[]={"unknown","node","way","relation"}; * Currently it keeps low 31 bits in y coordinate and up to 30 high order bits in x coordinate, allowing for 61 bit osm node id in total. */ #define REF_MARKER (1ull << 30) -#define IS_REF(c) (((c).x & REF_MARKER)!=0) +#define REF_MASK (3ull << 30) +#define IS_REF(c) (((c).x & REF_MASK)==REF_MARKER) #define GET_REF(c) ((((osmid)(c).x & ~REF_MARKER)<<31) + (c).y ) #define SET_REF(c,ref) do { (c).x = REF_MARKER | ((osmid)(ref)>>31); (c).y = (osmid)(ref) & 0x7fffffffull; } while(0) |