Fixed a misuse of the memset function.