From 06acd3f5d014dcb2d5d984d2ebe916eb5e3aa78b Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 14 Dec 2006 12:12:02 +0000 Subject: [PATCH] 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 --- cmd.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.39.2