From 243f8cdd361741a4407c0d358719dd6b7ef871d9 Mon Sep 17 00:00:00 2001 From: Kp Date: Mon, 2 Sep 2013 23:58:38 +0000 Subject: [PATCH] Simplify D1X SPREADFIRE truncation --- similar/main/text.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/similar/main/text.c b/similar/main/text.c index 942861268..2f34e3c17 100644 --- a/similar/main/text.c +++ b/similar/main/text.c @@ -316,8 +316,7 @@ void load_text() case 116: if (!d_stricmp(Text_string[i], "SPREADFIRE")) // This string is too long to fit in the cockpit-box { - memset(Text_string[i], '\0', sizeof(char)*(strlen(Text_string[i])+1)); - strncpy(Text_string[i], "SPREAD", sizeof(char)*6); + Text_string[i][6] = 0; } break; #endif