Incorrect .reverse()
in validations
#193
Labels
1.2 target
Issues aimed for 1.2 release
help wanted
Extra attention is needed
maintenance
Code and project improvements
In
wbsc-validation.ts
insidecheckHit
there liesThe usage of
.reverse()
unintentionally changes the order of elements in the source array. This is a classic "pass-by-reference" bug that lived under the radar for a long time.The problem is removing it now will cause other validations to start failing, as some of them already relly on swapped element order. Therefore, fixing this little flaw also means double-checking all validations (or all that occur after
checkHit
). Who volunteers?The text was updated successfully, but these errors were encountered: