mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-15 21:46:09 +03:00
fix(console): fix improper printing in 'cvarlist' command
This commit is contained in:
parent
93be23dacc
commit
f6fba9b74c
@ -388,14 +388,14 @@ int32_t CvarListCommandHandler(const char* command, const char* arguments) {
|
|||||||
|
|
||||||
if (cvar->m_defaultValue.GetString()) {
|
if (cvar->m_defaultValue.GetString()) {
|
||||||
if (SStrCmp(cvar->m_stringValue.GetString(), cvar->m_defaultValue.GetString(), STORM_MAX_STR)) {
|
if (SStrCmp(cvar->m_stringValue.GetString(), cvar->m_defaultValue.GetString(), STORM_MAX_STR)) {
|
||||||
SStrPrintf(text2, sizeof(text2), " (default \"%s\")", cvar->m_defaultValue);
|
SStrPrintf(text2, sizeof(text2), " (default \"%s\")", cvar->m_defaultValue.GetString());
|
||||||
SStrPack(text, text2, sizeof(text));
|
SStrPack(text, text2, sizeof(text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cvar->m_resetValue.GetString()) {
|
if (cvar->m_resetValue.GetString()) {
|
||||||
if (SStrCmp(cvar->m_stringValue.GetString(), cvar->m_resetValue.GetString(), STORM_MAX_STR)) {
|
if (SStrCmp(cvar->m_stringValue.GetString(), cvar->m_resetValue.GetString(), STORM_MAX_STR)) {
|
||||||
SStrPrintf(text2, sizeof(text2), " (reset \"%s\")", cvar->m_resetValue);
|
SStrPrintf(text2, sizeof(text2), " (reset \"%s\")", cvar->m_resetValue.GetString());
|
||||||
SStrPack(text, text2, sizeof(text));
|
SStrPack(text, text2, sizeof(text));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -162,7 +162,7 @@ CONSOLECOMMAND* ParseCommand(const char* commandLine, const char** command, char
|
|||||||
auto code = SUniSGetUTF8(reinterpret_cast<const uint8_t*>(string), &chars);
|
auto code = SUniSGetUTF8(reinterpret_cast<const uint8_t*>(string), &chars);
|
||||||
|
|
||||||
// Discard space
|
// Discard space
|
||||||
while(code != -1 && code == ' ') {
|
while (code != -1 && code == ' ') {
|
||||||
string += chars;
|
string += chars;
|
||||||
code = SUniSGetUTF8(reinterpret_cast<const uint8_t*>(string), &chars);
|
code = SUniSGetUTF8(reinterpret_cast<const uint8_t*>(string), &chars);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user