fix extension check logic

This commit is contained in:
PancakeTAS 2025-07-07 03:00:58 +02:00
parent 42ff9d7fd0
commit a9452ab198
No known key found for this signature in database

View file

@ -2,6 +2,7 @@
#include "utils/log.hpp"
#include "layer.hpp"
#include <cstring>
#include <lsfg.hpp>
#include <algorithm>
@ -51,7 +52,10 @@ std::vector<const char*> Utils::addExtensions(const char* const* extensions, siz
std::copy_n(extensions, count, ext.data());
for (const auto& e : requiredExtensions) {
auto it = std::ranges::find(ext, e);
auto it = std::ranges::find_if(ext,
[e](const char* extName) {
return std::strcmp(extName, e) == 0;
});
if (it == ext.end()) {
Log::debug("hooks-init", "Adding extension: {}", e);
ext.push_back(e);