From 047262d4e50c82a51f82a42bdfd03bf2813972ea Mon Sep 17 00:00:00 2001 From: psykose Date: Sat, 9 Apr 2022 12:47:51 +0000 Subject: [PATCH] testing/wesnoth: fix segfault --- testing/wesnoth/APKBUILD | 5 ++++- testing/wesnoth/fix-segfault.patch | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 testing/wesnoth/fix-segfault.patch diff --git a/testing/wesnoth/APKBUILD b/testing/wesnoth/APKBUILD index a978560244c..63ca870fb40 100644 --- a/testing/wesnoth/APKBUILD +++ b/testing/wesnoth/APKBUILD @@ -24,7 +24,9 @@ makedepends=" sdl2_mixer-dev " subpackages="$pkgname-doc" -source="https://sourceforge.net/projects/wesnoth/files/wesnoth-$_major/wesnoth-$pkgver/wesnoth-$pkgver.tar.bz2" +source="https://sourceforge.net/projects/wesnoth/files/wesnoth-$_major/wesnoth-$pkgver/wesnoth-$pkgver.tar.bz2 + fix-segfault.patch + " options="!check" # No tests build() { @@ -46,4 +48,5 @@ package() { sha512sums=" bb1c307981de4990fc341310b358c5e1c54673d7434bc0a0fa0a7b5caf11e6db3255ad0eb57b6b188ff6ab8f287321fc8821813d0ef3661cfa637985070bb540 wesnoth-1.16.2.tar.bz2 +8fc0f43719d0a5b7554a027f4367d5c7459549741b82c3c879385dd5c8e10e96a2064f329090ac2a0a5e853d5591a7ecd0ce650748f597cd81a90fb7d11581ae fix-segfault.patch " diff --git a/testing/wesnoth/fix-segfault.patch b/testing/wesnoth/fix-segfault.patch new file mode 100644 index 00000000000..5574e899eac --- /dev/null +++ b/testing/wesnoth/fix-segfault.patch @@ -0,0 +1,11 @@ +--- a/src/recall_list_manager.cpp ++++ b/src/recall_list_manager.cpp +@@ -57,7 +57,7 @@ + void recall_list_manager::erase_if_matches_id(const std::string &unit_id) + { + recall_list_.erase(std::remove_if(recall_list_.begin(), recall_list_.end(), +- [&unit_id](const unit_ptr & ptr) { return ptr->id() == unit_id; }), ++ [unit_id](const unit_ptr & ptr) { return ptr->id() == unit_id; }), + recall_list_.end()); + } +