Comment 4 for bug 539480

Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

Actually, I think the solution here is to change:

#define IDX_GET_NODE_REF(t, x, o) XT_GET_NODE_REF(t, (x) - (o))

to:

#define IDX_GET_NODE_REF(t, x, o) ((o) ? XT_GET_NODE_REF(t, (x) - (o) : 0)

Because if the node reference size (o) is zero, then this particular index node is leaf. And leaves to not have any references to other nodes.