Kaynağa Gözat

Bug fix - features were fetches off-by-one

Sam Jaffe 8 yıl önce
ebeveyn
işleme
1a511d90aa

+ 2 - 1
src/main/lombok/org/leumasjaffe/charsheet/model/DDClass.java

@@ -78,7 +78,8 @@ public class DDClass {
 	}
 
 	public List<DDProperty> getFeatures(int level) {
-		return features.size() > level ? Collections.unmodifiableList(features.get(level)) : Collections.emptyList();
+		return features.size() < level ? Collections.emptyList() :
+			Collections.unmodifiableList(features.get(level-1));
 	}
 
 	public Optional<DDSpellbook> createNewSpellBook()  {