Sets correct length for memmove() operation.

In reference to #439.