Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Prelude
Changes Proposed
Fixes 2 checks in search store function:
it prevents trying to search with an empty item list, this is not even allowed by the client, and makes no sense in the process, as it always start the search by an item. (that's why I put the check on clif)
When searching for an item without asking for cards, it was giving us a nullpo because card_list would be NULL (as it becomes a "0-length array"), but it is a totally valid search (e.g. Searching for an ETC item would never have cards to check for). So I disabled the null pointer check when the card count is zero, from my tests and checking the code, every code called from this would check card count before trying to access the array, so it looks safe.
Issues addressed:
None, i think