be prepared for indexing stub number 0

This commit is contained in:
Maxim.Mossienko
2016-03-13 00:09:59 +01:00
parent ae6fb1ec50
commit 1451882fb9
@@ -124,7 +124,7 @@ public class ObjectStubTree<T extends Stub> {
} else {
int lastZero;
for(lastZero = list.length - 1; lastZero >=0 && list[lastZero] == 0; --lastZero);
if (list[lastZero] == myStubIdx) {
if (lastZero >= 0 && list[lastZero] == myStubIdx) {
// second and subsequent occurrence calls for the same value are no op
return;
}