else\r
{\r
if(command.position<aSize)\r
- temp = new Annotation[aSize - command.number + command.position];\r
+ {\r
+ if (aSize - command.number + command.position > 0)\r
+ temp = new Annotation[aSize - command.number + command.position];\r
+ else\r
+ temp = new Annotation[aSize];\r
+ }\r
else\r
temp = new Annotation[aSize];\r
}\r
}\r
else\r
{\r
- if(command.position < aSize)\r
+ if(command.position < aSize && aSize - command.number+command.position>0)\r
{\r
System.arraycopy(annotations[a].annotations,\r
0, temp, 0, command.position);\r