if (end > blockStart)\r
{\r
annels.addElement(els = new Annotation[end - blockStart + 1]);\r
- if (end - blockStart + 1 <= alignmentAnnotation.annotations.length)\r
+ if ((els.length+blockStart)<= alignmentAnnotation.annotations.length)\r
{\r
+ // copy just the visible segment of the annotation row\r
System.arraycopy(alignmentAnnotation.annotations, blockStart,\r
els, 0, els.length);\r
}\r
else\r
{\r
+ // copy to the end of the annotation row\r
System.arraycopy(alignmentAnnotation.annotations, blockStart,\r
- els, 0, (end - blockStart + 1));\r
+ els, 0, (alignmentAnnotation.annotations.length - blockStart));\r
}\r
w += els.length;\r
}\r