mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 14:08:19 +00:00
Show correct max length in help text for MACRO_CONFIG_STR
This commit is contained in:
parent
d6aa18e5b4
commit
f39792f330
|
@ -1041,7 +1041,9 @@ void CConsole::Init()
|
||||||
{ \
|
{ \
|
||||||
static char s_aOldValue[Len] = Def; \
|
static char s_aOldValue[Len] = Def; \
|
||||||
static CStrVariableData Data = {this, g_Config.m_##Name, Len, s_aOldValue}; \
|
static CStrVariableData Data = {this, g_Config.m_##Name, Len, s_aOldValue}; \
|
||||||
Register(#ScriptName, "?r", Flags, StrVariableCommand, &Data, Desc " (default: " #Def ", max length: " #Len ")"); \
|
static char s_aHelp[256]; \
|
||||||
|
str_format(s_aHelp, sizeof(s_aHelp), "%s (default: \"%s\", max length: %d)", Desc, Def, Len - 1); \
|
||||||
|
Register(#ScriptName, "?r", Flags, StrVariableCommand, &Data, s_aHelp); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "config_variables.h"
|
#include "config_variables.h"
|
||||||
|
|
Loading…
Reference in a new issue