On 04/13/2014 09:02 AM, Michael Van Canneyt wrote: > > > You are right. A logic error. ReallocMem is the more tricky one. > Revised.
In case of a block move, the memory (OP) is already freed when you clear/scramble it. I'm afraid you can't simply re-use the underlying ReAllocMem (think cmem for example). > > That's why I post such quick code; for peer review. > > Thanks for pointing these out, revised version attached. > Again, comments/reviews welcome. > You're welcome :) Ludo _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal