Skip to content

Commit 1742968

Browse files
Fix ranges::filter crash (#1236)
1 parent d004800 commit 1742968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

loader/include/Geode/utils/ranges.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ namespace geode::utils::ranges {
209209
template <ValidContainer C, ValidCUnaryPredicate<C> Predicate>
210210
C filter(C const& container, Predicate filterFun) {
211211
auto res = C();
212-
std::copy_if(container.begin(), container.end(), res.end(), filterFun);
212+
std::copy_if(container.begin(), container.end(), std::back_inserter(res), filterFun);
213213
return res;
214214
}
215215

0 commit comments

Comments
 (0)