ref: 587a9702634a405b95a6e317db9ce0f8ec326155
parent: 24222e71326cc6462407cee099f5d711a175aca7
author: Simon Howard <[email protected]>
date: Wed Sep 20 15:04:02 EDT 2006
Make sure modified copyright banners always end in a newline. If they don't, add one. This fixes av.wad (thanks to myk for reporting). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 638
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: d_main.c 596 2006-09-02 19:10:07Z fraggle $
+// $Id: d_main.c 638 2006-09-20 19:04:02Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -184,7 +184,7 @@
//-----------------------------------------------------------------------------
-static const char rcsid[] = "$Id: d_main.c 596 2006-09-02 19:10:07Z fraggle $";
+static const char rcsid[] = "$Id: d_main.c 638 2006-09-20 19:04:02Z fraggle $";
#define BGCOLOR 7
#define FGCOLOR 8
@@ -1277,6 +1277,14 @@
if (deh_s != copyright_banners[i])
{
printf("%s", deh_s);
+
+ // Make sure the modified banner always ends in a newline character.
+ // If it doesn't, add a newline. This fixes av.wad.
+
+ if (deh_s[strlen(deh_s) - 1] != '\n')
+ {
+ printf("\n");
+ }
}
}
}