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 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()) {