The next line is missing, which should be:
vRev(vRevlen+1) = vIrrev(i);