3 ms·
> Since the loop copies data pointer by pointer, it can handle the case of overlapping data. I don't think this loop does the right thing if destination points
by davrosthedalek 1y ago
> Since the loop copies data pointer by pointer, it can handle the case of overlapping data.
I don't think this loop does the right thing if destination points somewhere into source. It will start overwriting the non-copied parts of source.
- penguin_booze 1y agoIt'll indeed. Copying data pointer-by-pointer has nothing to do with overlaps. One should iterate backwards to deal with overlapping.