Fix divide by zero in memcpy checks.

Happened in Resistance demo.