Dapizz01 / PokemonWeaknessCalculator

0 stars 0 forks source link

Error when updating values in teamMovesEffectives #9

Closed Dapizz01 closed 2 years ago

Dapizz01 commented 2 years ago

When a value is updated in a certain element of the object, the changes are applied in all elements. This is caused by the declaration of teamMovesEffectiveness, where every element is declared as a pointer of typeEffectiveness. In fact, only typeEffectiveness is updated. The fix is to change the declaration of teamMovesEffectiveness.

Dapizz01 commented 2 years ago

Fixed