Make sure lump name is zeroed out before writing so it always ends in a terminating char

git-svn-id: https://code.orospakr.ca/svn/srb2/trunk@9047 6de4a73c-47e2-0310-b8c1-93d6ecd3f8cd
This commit is contained in:
RedEnchilada 2015-02-20 18:13:31 +00:00 committed by Alam Ed Arias
parent a797e88bb9
commit bd5dcb0b0a

View file

@ -413,6 +413,7 @@ UINT16 W_LoadWadFile(const char *filename)
lump_p->disksize -= 4; lump_p->disksize -= 4;
} }
else lump_p->compressed = 0; else lump_p->compressed = 0;
memset(lump_p->name, 0x00, 9);
strncpy(lump_p->name, fileinfo->name, 8); strncpy(lump_p->name, fileinfo->name, 8);
} }
free(fileinfov); free(fileinfov);