aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorItsDrike <[email protected]>2023-10-06 13:01:40 +0000
committerGitHub <[email protected]>2023-10-06 14:01:40 +0100
commit1afb00a01b7cab3e68f5af3ca6a7d7d86b8f913e (patch)
tree79b9719b287f8db07a0e2cd58a70f0f1a707a262
parentcb7dd1ac6ef250dc25b8e86b744dd47a24f12971 (diff)
downloadHyprland-1afb00a01b7cab3e68f5af3ca6a7d7d86b8f913e.tar.gz
Hyprland-1afb00a01b7cab3e68f5af3ca6a7d7d86b8f913e.zip
pluginapi: remove starting newline in demangled func name (#3502)
-rw-r--r--src/plugins/PluginAPI.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/PluginAPI.cpp b/src/plugins/PluginAPI.cpp
index a133de38..f79af312 100644
--- a/src/plugins/PluginAPI.cpp
+++ b/src/plugins/PluginAPI.cpp
@@ -301,7 +301,11 @@ APICALL std::vector<SFunctionMatch> HyprlandAPI::findFunctionsByName(HANDLE hand
count++;
}
- return SYMBOLSDEMANGLED.substr(pos, SYMBOLSDEMANGLED.find('\n', pos + 1) - pos);
+ // Skip the newline char itself
+ if (pos != 0)
+ pos++;
+
+ return SYMBOLSDEMANGLED.substr(pos, SYMBOLSDEMANGLED.find('\n', pos) - pos);
};
if (SYMBOLS.empty()) {