summaryrefslogtreecommitdiff
path: root/engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'engine.c')
-rw-r--r--engine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/engine.c b/engine.c
index 23916de88..f980703bc 100644
--- a/engine.c
+++ b/engine.c
@@ -601,7 +601,8 @@ StringID GetCustomEngineName(int engine)
{
if (!_engine_custom_names[engine])
return _engine_name_strings[engine];
- strcpy(_userstring, _engine_custom_names[engine]);
+ strncpy(_userstring, _engine_custom_names[engine], USERSTRING_LEN);
+ _userstring[USERSTRING_LEN - 1] = '\0';
return STR_SPEC_USERSTRING;
}