From c2d637b109262e658be4c504388043ef89f6d4c4 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Mon, 3 Apr 2023 20:25:29 -0700 Subject: [PATCH] Fix out-of-range check. --- koboldsim/cardtypes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koboldsim/cardtypes.go b/koboldsim/cardtypes.go index e8485b9..fedc5e9 100644 --- a/koboldsim/cardtypes.go +++ b/koboldsim/cardtypes.go @@ -257,7 +257,7 @@ func (v *VerbosePolicy) fillDefaults() { for len(v.Variants) <= v.lastIdx { v.Variants = append(v.Variants, v.Default) } - if v.Variants[v.lastIdx] == nil { + if v.lastIdx > 0 && v.Variants[v.lastIdx] == nil { v.Variants[v.lastIdx] = v.Default } }