Fix valgrind complaints of uninitialized memory

This commit is contained in:
Pasi Kallinen
2016-05-23 16:21:36 +03:00
parent bc91a01fdd
commit e37da61b30
6 changed files with 7 additions and 1 deletions

View File

@@ -388,6 +388,7 @@ xchar e_type;
if ((ep = engr_at(x, y)) != 0)
del_engr(ep);
ep = newengr(strlen(s) + 1);
(void) memset((genericptr_t)ep, 0, sizeof(struct engr));
ep->nxt_engr = head_engr;
head_engr = ep;
ep->engr_x = x;