From 926c16f0ce102e48f75f1355e80fd08642dfb16f Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Thu, 20 Apr 2023 21:04:32 +0100 Subject: [PATCH] Spider: Fix crash when completing a deck This resolves a regression caused by 8a48246ed1a93983668a25f5b9b0af0e745e3f04. --- Userland/Games/Spider/Game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Games/Spider/Game.cpp b/Userland/Games/Spider/Game.cpp index d474186e43..95d7b10925 100644 --- a/Userland/Games/Spider/Game.cpp +++ b/Userland/Games/Spider/Game.cpp @@ -145,7 +145,7 @@ void Game::detect_full_stacks() uint8_t last_value; Color color; for (size_t i = current_pile.stack().size(); i > 0; i--) { - auto& card = current_pile.stack().at(i - 1); + auto card = current_pile.stack().at(i - 1); if (card->is_upside_down()) break;