pluginapi: remove starting newline in demangled func name (#3502)

This commit is contained in:
ItsDrike 2023-10-06 13:01:40 +00:00 committed by GitHub
parent cb7dd1ac6e
commit 1afb00a01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,7 +301,11 @@ APICALL std::vector<SFunctionMatch> HyprlandAPI::findFunctionsByName(HANDLE hand
count++; 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()) { if (SYMBOLS.empty()) {