Fix negative mutation value (#5504)

This commit is contained in:
Bassoonian 2024-10-11 19:49:24 +02:00 committed by GitHub
parent cac815164a
commit b5c884504c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2384,6 +2384,8 @@ static u8 GetTreeMutationValue(u8 id)
myMutation.asField.a = tree->mutationA;
myMutation.asField.b = tree->mutationB;
myMutation.asField.unused = 0;
if (myMutation.value == 0) // no mutation
return 0;
return sBerryMutations[myMutation.value - 1][2];
#else
return 0;