fix: Custom pattern include paths not working correctly
This commit is contained in:
parent
a56a8c1d6c
commit
1ddd3ea2b9
@ -31,6 +31,16 @@ namespace hex {
|
|||||||
long double operator""_scaled(unsigned long long value);
|
long double operator""_scaled(unsigned long long value);
|
||||||
ImVec2 scaled(const ImVec2 &vector);
|
ImVec2 scaled(const ImVec2 &vector);
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
std::vector<T> operator|(const std::vector<T> &lhs, const std::vector<T> &rhs) {
|
||||||
|
std::vector<T> result;
|
||||||
|
|
||||||
|
std::copy(lhs.begin(), lhs.end(), std::back_inserter(result));
|
||||||
|
std::copy(rhs.begin(), rhs.end(), std::back_inserter(result));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
std::string to_string(u128 value);
|
std::string to_string(u128 value);
|
||||||
std::string to_string(i128 value);
|
std::string to_string(i128 value);
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ namespace hex {
|
|||||||
}, provider->getBaseAddress(), provider->getActualSize());
|
}, provider->getBaseAddress(), provider->getActualSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
runtime->setIncludePaths(fs::getDefaultPaths(fs::ImHexPath::PatternsInclude));
|
runtime->setIncludePaths(fs::getDefaultPaths(fs::ImHexPath::PatternsInclude) | fs::getDefaultPaths(fs::ImHexPath::Patterns));
|
||||||
|
|
||||||
for (const auto &func : getFunctions()) {
|
for (const auto &func : getFunctions()) {
|
||||||
if (func.dangerous)
|
if (func.dangerous)
|
||||||
|
@ -812,6 +812,7 @@ namespace hex::plugin::builtin {
|
|||||||
|
|
||||||
auto &runtime = ProviderExtraData::getCurrent().patternLanguage.runtime;
|
auto &runtime = ProviderExtraData::getCurrent().patternLanguage.runtime;
|
||||||
runtime->reset();
|
runtime->reset();
|
||||||
|
runtime->setIncludePaths(fs::getDefaultPaths(fs::ImHexPath::PatternsInclude) | fs::getDefaultPaths(fs::ImHexPath::Patterns));
|
||||||
|
|
||||||
EventManager::post<EventHighlightingChanged>();
|
EventManager::post<EventHighlightingChanged>();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user