and change argument order to match memcpy. Oh, and fix a lulzy buffer overflow in IOS emulation while I'm at it.