converted script loading to use COM_LoadMallocFile instead of COM_LoadHunkFile
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 30 May 2001 04:38:19 +0000 (04:38 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 30 May 2001 04:38:19 +0000 (04:38 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@211 d7cf8633-e32d-0410-b094-e92efae38249

cmd.c

diff --git a/cmd.c b/cmd.c
index 85cd55c..ae32872 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -283,7 +283,6 @@ Cmd_Exec_f
 void Cmd_Exec_f (void)
 {
        char    *f;
-       int             mark;
 
        if (Cmd_Argc () != 2)
        {
@@ -291,8 +290,7 @@ void Cmd_Exec_f (void)
                return;
        }
 
-       mark = Hunk_LowMark ();
-       f = (char *)COM_LoadHunkFile (Cmd_Argv(1), false);
+       f = (char *)COM_LoadMallocFile (Cmd_Argv(1), false);
        if (!f)
        {
                Con_Printf ("couldn't exec %s\n",Cmd_Argv(1));
@@ -301,7 +299,7 @@ void Cmd_Exec_f (void)
        Con_Printf ("execing %s\n",Cmd_Argv(1));
        
        Cbuf_InsertText (f);
-       Hunk_FreeToLowMark (mark);
+       qfree(f);
 }