master
leitner 20 years ago
parent 3fc96fdc7f
commit dd61fe2f56

@ -25,6 +25,6 @@ void* array_get(array* x,uint64 membersize,int64 pos) {
if (__unlikely(pos+1<1)) return 0;
if (__unlikely(!umult64(membersize,pos,&wanted))) return 0;
if (__unlikely((int64)wanted >= x->allocated)) return 0;
if (__unlikely((int64)wanted >= x->allocated || wanted>=x->initialized)) return 0;
return x->p+pos*membersize;
}

Loading…
Cancel
Save