diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-03-30 14:30:13 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2026-03-30 14:30:18 +0100 |
| commit | f57fd6ed37579b2739a90e42b034062e01d7d67a (patch) | |
| tree | 51faf3963d09fc68bb74d60742201243673b54dd /src/debug/HyprCtl.cpp | |
| parent | bb84f4e91a3ac77706c4ef85e06e3bfaff487fc8 (diff) | |
config: fix type confusion in getOption with complex types
fixes https://github.com/hyprwm/Hyprland/discussions/13915
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 01e49e74..4772894f 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -1773,7 +1773,7 @@ static std::string dispatchGetOption(eHyprCtlOutputFormat format, std::string re else if (TYPE == typeid(Config::STRING)) return std::format("str: {}\nset: {}", **rc<Config::STRING* const*>(VAL), VAR.setByUser); else if (TYPE == typeid(void*)) - return std::format("custom type: {}\nset: {}", (*rc<Config::IComplexConfigValue* const*>(VAL))->toString(), VAR.setByUser); + return std::format("custom type: {}\nset: {}", rc<Config::IComplexConfigValue*>((*rc<Hyprlang::CUSTOMTYPE* const*>(VAL))->getData())->toString(), VAR.setByUser); } else { if (TYPE == typeid(Config::INTEGER)) return std::format(R"({{"option": "{}", "int": {}, "set": {} }})", curitem, **rc<Config::INTEGER* const*>(VAL), VAR.setByUser); @@ -1787,7 +1787,8 @@ static std::string dispatchGetOption(eHyprCtlOutputFormat format, std::string re else if (TYPE == typeid(Config::STRING)) return std::format(R"({{"option": "{}", "str": "{}", "set": {} }})", curitem, **rc<Config::STRING* const*>(VAL), VAR.setByUser); else if (TYPE == typeid(void*)) - return std::format(R"({{"option": "{}", "custom": "{}", "set": {} }})", curitem, (*rc<Config::IComplexConfigValue* const*>(VAL))->toString(), VAR.setByUser); + return std::format(R"({{"option": "{}", "custom": "{}", "set": {} }})", curitem, + rc<Config::IComplexConfigValue*>((*rc<Hyprlang::CUSTOMTYPE* const*>(VAL))->getData())->toString(), VAR.setByUser); } return "invalid type (internal error)"; |
