mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
use malloc/free instead of Hunk_TempAlloc in Cmd_Exec_File so it can be called before Memory_Init
This commit is contained in:
parent
e91180cccf
commit
39401592d4
1 changed files with 2 additions and 1 deletions
|
@ -287,12 +287,13 @@ Cmd_Exec_File (const char *path)
|
|||
return;
|
||||
if ((file = Qopen (path, "r")) != NULL) {
|
||||
len = COM_filelength (file);
|
||||
f = (char *) Hunk_TempAlloc (len + 1);
|
||||
f = (char *) malloc (len + 1);
|
||||
if (f) {
|
||||
f[len] = 0;
|
||||
Qread (file, f, len);
|
||||
Qclose (file);
|
||||
Cbuf_InsertText (f);
|
||||
free (f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue