From: havoc Date: Thu, 14 Dec 2006 12:12:02 +0000 (+0000) Subject: add a newline at the end of each exec'd config file X-Git-Tag: xonotic-v0.1.0preview~3751 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=06acd3f5d014dcb2d5d984d2ebe916eb5e3aa78b;p=xonotic%2Fdarkplaces.git add a newline at the end of each exec'd config file git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6649 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cmd.c b/cmd.c index 504a88d5..a911fb34 100644 --- a/cmd.c +++ b/cmd.c @@ -287,6 +287,9 @@ static void Cmd_Exec_f (void) if (!strcmp(Cmd_Argv(1), "default.cfg")) Cbuf_InsertText("\ncvar_lockdefaults\n"); + // insert newline after the text to make sure the last line is terminated (some text editors omit the trailing newline) + // (note: insertion order here is backwards from execution order, so this adds it after the text, by calling it before...) + Cbuf_InsertText ("\n"); Cbuf_InsertText (f); Mem_Free(f); }