src: Use memcpy rather than memset and a loop

Speeds up the program a bit :)
Merge pull request #3 from stephenmathieson/memcpy

src: Use memcpy rather than memset and a loop