Replaced the usage of memcpy with a simple dereference assignment.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
Merge pull request #324 from ddobrev/master

Replaced the usage of memcpy with a simple dereference assignment