subvec() to mean "the whole vector". Melchior showed a use case
(removal of the first element from a vector) where getting a
zero-length subvector is actually desired. And since I can't come up
with a good reason for why the "feature" was there in the first place,
out it goes...
len = (int)nlen.num;
if(!naIsVector(v) || start < 0 || start >= naVec_size(v) || len < 0)
return naNil();
- if(len == 0 || len > naVec_size(v) - start) len = naVec_size(v) - start;
+ if(len > naVec_size(v) - start) len = naVec_size(v) - start;
result = naNewVector(c);
naVec_setsize(result, len);
for(i=0; i<len; i++)