# HG changeset patch # User Richard M. Stallman # Date 786575202 0 # Node ID 3fc246695491a3ce60bd9a852f3efc2e8235336a # Parent add3c6d21876635cdfb9018727fa03e14e0aa698 (INTERVAL_LAST_POS): Don't subtract 1 here. diff -r add3c6d21876 -r 3fc246695491 src/intervals.h --- a/src/intervals.h Sun Dec 04 20:59:04 1994 +0000 +++ b/src/intervals.h Sun Dec 04 21:06:42 1994 +0000 @@ -80,9 +80,9 @@ - TOTAL_LENGTH ((i)->right) \ - TOTAL_LENGTH ((i)->left))) -/* The absolute index of the last character belonging to I. Note that +/* The position of the character just past the end of I. Note that the position cache i->position must be valid for this to work. */ -#define INTERVAL_LAST_POS(i) ((i)->position + LENGTH ((i)) - 1) +#define INTERVAL_LAST_POS(i) ((i)->position + LENGTH ((i))) /* The total size of the left subtree of this interval. */ #define LEFT_TOTAL_LENGTH(i) ((i)->left ? (i)->left->total_length : 0)