Merge branch 'fix-ioopen-crash' into 'next'

Fix io.open() crashing the client sometimes

See merge request STJr/SRB2!2578
This commit is contained in:
LJ Sonic 2024-12-29 23:22:55 +00:00
commit a4f907fea1

View file

@ -606,7 +606,7 @@ void AddLuaFileTransfer(const char *filename, const char *mode)
prevnext = &((*prevnext)->next);
// Allocate file transfer information and append it to the transfer list
filetransfer = malloc(sizeof(luafiletransfer_t));
filetransfer = calloc(1, sizeof(luafiletransfer_t));
if (!filetransfer)
I_Error("AddLuaFileTransfer: Out of memory\n");
*prevnext = filetransfer;