* turn it into a range.
*/
if ( BDB_IDL_IS_RANGE( b )
- && BDB_IDL_RANGE_FIRST( b ) <= BDB_IDL_RANGE_FIRST( a )
- && BDB_IDL_RANGE_LAST( b ) >= BDB_IDL_RANGE_LAST( a ) ) {
+ && BDB_IDL_RANGE_FIRST( b ) <= BDB_IDL_FIRST( a )
+ && BDB_IDL_RANGE_LAST( b ) >= BDB_IDL_LLAST( a ) ) {
if (idmax - idmin + 1 == a[0])
{
a[0] = NOID;
#define BDB_IDL_ALL( bdb, ids ) BDB_IDL_RANGE( ids, 1, ((bdb)->bi_lastid) )
#define BDB_IDL_FIRST( ids ) ( (ids)[1] )
+#define BDB_IDL_LLAST( ids ) ( (ids)[(ids)[0]] )
#define BDB_IDL_LAST( ids ) ( BDB_IDL_IS_RANGE(ids) \
? (ids)[2] : (ids)[(ids)[0]] )
* turn it into a range.
*/
if ( MDB_IDL_IS_RANGE( b )
- && MDB_IDL_RANGE_FIRST( b ) <= MDB_IDL_RANGE_FIRST( a )
- && MDB_IDL_RANGE_LAST( b ) >= MDB_IDL_RANGE_LAST( a ) ) {
+ && MDB_IDL_RANGE_FIRST( b ) <= MDB_IDL_FIRST( a )
+ && MDB_IDL_RANGE_LAST( b ) >= MDB_IDL_LLAST( a ) ) {
if (idmax - idmin + 1 == a[0])
{
a[0] = NOID;
#define MDB_IDL_ALL( ids ) MDB_IDL_RANGE( ids, 1, NOID )
#define MDB_IDL_FIRST( ids ) ( (ids)[1] )
+#define MDB_IDL_LLAST( ids ) ( (ids)[(ids)[0]] )
#define MDB_IDL_LAST( ids ) ( MDB_IDL_IS_RANGE(ids) \
? (ids)[2] : (ids)[(ids)[0]] )