X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=selector.git;a=blobdiff_plain;f=selector.c;h=ddddb112f95f0f6f596365354154950388401b80;hp=0cb82ea6aa21f861ec23b34c14b9182facfe9d08;hb=5f6df6ed91c745f06cdaec8983a7b1485994da39;hpb=c5194e53d7cf6545a6c8586dff88833026ce6416 diff --git a/selector.c b/selector.c index 0cb82ea..ddddb11 100644 --- a/selector.c +++ b/selector.c @@ -335,8 +335,8 @@ int add_interval(int n, int *switches, int start, int end) { while(g < n && switches[g] <= end) { g++; } if(f == n) { - /* switches[n] start end */ - /* XXXXXXXXXX| */ + /* switches[n-1] start end */ + /* XXXXXXXXXXXX| */ switches[f] = start; switches[f+1] = end; return n + 2;