Browse Source

engine: fix config executing

pull/77/head
nillerusr 2 years ago
parent
commit
bf0062066d
  1. 8
      engine/cmd.cpp

8
engine/cmd.cpp

@ -624,12 +624,13 @@ void Cmd_Exec_f( const CCommand &args )
} }
} }
static char buf[16384] = { 0 }; char *buf = new char[16384];
int len = 0; int len = 0;
char *f = (char *)COM_LoadStackFile( fileName, buf, sizeof( buf ), len ); char *f = (char *)COM_LoadStackFile( fileName, buf, 16384, len );
if ( !f ) if ( !f )
{ {
ConMsg( "exec: couldn't exec %s\n", szFile ); ConMsg( "exec: couldn't exec %s\n", szFile );
delete[] buf;
return; return;
} }
@ -684,6 +685,9 @@ void Cmd_Exec_f( const CCommand &args )
free( f ); free( f );
} }
} }
delete[] buf;
// force any queued convar changes to flush before reading/writing them // force any queued convar changes to flush before reading/writing them
UpdateMaterialSystemConfig(); UpdateMaterialSystemConfig();
} }

Loading…
Cancel
Save