Improve MxControlPresenter::FUN_10044270 (#1422)

This commit is contained in:
MS
2025-04-03 16:25:40 -04:00
committed by GitHub
parent 466c345201
commit 8821593b63
4 changed files with 74 additions and 76 deletions

View File

@@ -81,6 +81,7 @@ void MakeSourceName(char* p_output, const char* p_input)
}
// FUNCTION: LEGO1 0x100b7050
// FUNCTION: BETA10 0x10136c19
MxBool KeyValueStringParse(char* p_output, const char* p_command, const char* p_string)
{
MxBool didMatch = FALSE;
@@ -92,7 +93,8 @@ MxBool KeyValueStringParse(char* p_output, const char* p_command, const char* p_
assert(string);
strcpy(string, p_string);
for (char* token = strtok(string, ", \t\r\n:"); token; token = strtok(NULL, ", \t\r\n:")) {
const char* delim = ", \t\r\n:";
for (char* token = strtok(string, delim); token; token = strtok(NULL, delim)) {
len -= (strlen(token) + 1);
if (strcmpi(token, p_command) == 0) {
@@ -116,6 +118,7 @@ MxBool KeyValueStringParse(char* p_output, const char* p_command, const char* p_
}
// FUNCTION: LEGO1 0x100b7170
// FUNCTION: BETA10 0x10136e12
MxBool ContainsPresenter(MxCompositePresenterList& p_presenterList, MxPresenter* p_presenter)
{
for (MxCompositePresenterList::iterator it = p_presenterList.begin(); it != p_presenterList.end(); it++) {