use malloc/free instead of Hunk_TempAlloc in Cmd_Exec_File so it can be called before Memory_Init

This commit is contained in:
Bill Currie 2001-11-14 20:16:57 +00:00
parent e91180cccf
commit 39401592d4

View file

@ -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);
}
}
}