mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-07 08:52:01 +00:00
Fix io.open() crashing the client sometimes
This commit is contained in:
parent
28d5b79fa5
commit
91d1c11617
1 changed files with 1 additions and 1 deletions
|
@ -606,7 +606,7 @@ void AddLuaFileTransfer(const char *filename, const char *mode)
|
||||||
prevnext = &((*prevnext)->next);
|
prevnext = &((*prevnext)->next);
|
||||||
|
|
||||||
// Allocate file transfer information and append it to the transfer list
|
// Allocate file transfer information and append it to the transfer list
|
||||||
filetransfer = malloc(sizeof(luafiletransfer_t));
|
filetransfer = calloc(1, sizeof(luafiletransfer_t));
|
||||||
if (!filetransfer)
|
if (!filetransfer)
|
||||||
I_Error("AddLuaFileTransfer: Out of memory\n");
|
I_Error("AddLuaFileTransfer: Out of memory\n");
|
||||||
*prevnext = filetransfer;
|
*prevnext = filetransfer;
|
||||||
|
|
Loading…
Reference in a new issue