From fd30879b01e7327a0e485cfddc8ef5c17febe336 Mon Sep 17 00:00:00 2001 From: yukani Date: Sat, 5 Oct 2024 21:28:25 +0300 Subject: [PATCH] use sizeof instead of magic --- source/game_sa/Scripts/Commands/Text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/game_sa/Scripts/Commands/Text.cpp b/source/game_sa/Scripts/Commands/Text.cpp index ff18ba1c3..51235ff05 100644 --- a/source/game_sa/Scripts/Commands/Text.cpp +++ b/source/game_sa/Scripts/Commands/Text.cpp @@ -64,7 +64,7 @@ void DisplayText(CVector2D pos, const char* gxtKey) { line->m_Pos = pos; line->param1 = -1; line->param2 = -1; - strncpy(line->m_szGxtEntry, gxtKey, 8); + strncpy(line->m_szGxtEntry, gxtKey, sizeof(line->m_szGxtEntry)); } void notsa::script::commands::text::RegisterHandlers() {