diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 67d21d9a..1dca1a7d 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -57,9 +57,9 @@ static QMap orderMap = orderMapInit(); static uint order(uint type) { - uint st = (type>>16 == BUAARE) ? type : type & 0xFFFF; + uint st = ((type>>16) == BUAARE) ? type : (type & 0xFFFF0000); QMap::const_iterator it = orderMap.find(st); - return (it == orderMap.constEnd()) ? type + 512 : it.value(); + return (it == orderMap.constEnd()) ? (type>>16) + 512 : it.value(); } static void warning(const ISO8211::Field &FRID, uint PRIM)