From f57fd6ed37579b2739a90e42b034062e01d7d67a Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 30 Mar 2026 14:30:13 +0100 Subject: [PATCH] config: fix type confusion in getOption with complex types fixes https://github.com/hyprwm/Hyprland/discussions/13915 --- src/debug/HyprCtl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 01e49e746..4772894f3 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(VAL), VAR.setByUser); else if (TYPE == typeid(void*)) - return std::format("custom type: {}\nset: {}", (*rc(VAL))->toString(), VAR.setByUser); + return std::format("custom type: {}\nset: {}", rc((*rc(VAL))->getData())->toString(), VAR.setByUser); } else { if (TYPE == typeid(Config::INTEGER)) return std::format(R"({{"option": "{}", "int": {}, "set": {} }})", curitem, **rc(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(VAL), VAR.setByUser); else if (TYPE == typeid(void*)) - return std::format(R"({{"option": "{}", "custom": "{}", "set": {} }})", curitem, (*rc(VAL))->toString(), VAR.setByUser); + return std::format(R"({{"option": "{}", "custom": "{}", "set": {} }})", curitem, + rc((*rc(VAL))->getData())->toString(), VAR.setByUser); } return "invalid type (internal error)";