From 524520acd1ad38a74bcef16a2c1da255b7e50d77 Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 13 Feb 2020 09:43:26 +0100 Subject: [PATCH] Fixes another crash --- .../android/ui/modules/handhistory/model/CardsRow.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/CardsRow.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/CardsRow.kt index 2e81ef59..94dde54a 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/CardsRow.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/CardsRow.kt @@ -182,10 +182,10 @@ class StreetCardsRow(var street: Street, var handHistory: HandHistory) : CardsRo Street.PREFLOP.ordinal -> listOf() Street.FLOP.ordinal -> cards.take(3) Street.TURN.ordinal -> { - if (cards.size > 3) { listOf(cards[4]!!) } else { null } + if (cards.size > 3) { listOf(cards[3]!!) } else { null } } Street.RIVER.ordinal -> { - if (cards.size > 4) { listOf(cards[5]!!) } else { null } + if (cards.size > 4) { listOf(cards[4]!!) } else { null } } else -> throw PAIllegalStateException("unmanaged tag $tag") }