Skip to content

Wrong compare method in ControlBarSchemeManager::Find_Control_Bar_Scheme #1014

Open
@xezon

Description

@xezon

names are lower case, and yet it uses Compare_No_Case instead of Compare.

ControlBarScheme *ControlBarSchemeManager::Find_Control_Bar_Scheme(Utf8String name)
{
    name.To_Lower();

    for (auto it = m_schemeList.begin(); it != m_schemeList.end(); it++) {
        ControlBarScheme *scheme = *it;

        if (scheme == nullptr) {
            break;
        }

        if (scheme->m_name.Compare_No_Case(name) == 0) {
            return scheme;
        }
    }

    captainslog_debug("There's no ControlBarScheme in the ControlBarSchemeList:m_schemeList");
    return nullptr;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions