Bmiuritan,


I think what would fix the problem is:

int iEnd = cTemp - 1;
instead of
int iEnd = cTemp - cSource - 1;