Submitted by gpersoon
The function tokenExists does only limited checks on the existence of cards.
It doesnt doublecheck that tokenIds[_card] != 0
This is relevant because 0 is the default value of empty array elements. Although this isnt a problem in the current code,
future changes might accidentally introduce vulnerabilities.
Also cards are only valid if they are below numberOfCards. This has led to vulnerabilities in previous versions of the contract
(e.g. previous contest)
Recommend changing the function to something like the following:
Splidge (Reality Cards) confirmed:
Splidge (Reality Cards) patched:
