Update Array safeValue(at:)
behavior for negative index
#279
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.
Before you make a Pull Request, read the important guidelines:
Issue Link 🔗 #278
Goals of this PR 🎉
Though it does not pose any issue at present as there is only one occurrence of
safeValue(at:)
usage, in CardPartHistogramView, which does not use a negative index, the extension method would crash if a negative index is used.CardParts/CardParts/src/Classes/Card Parts/CardPartHistogramView.swift
Lines 83 to 85 in 27126a7
How Has This Been Tested 🔍
Please let us know if you have tested your PR and if we need to reproduce the issues. Also, please let us know if we need any relevant information for running the tests.
Test Configuration 👾
Things to check on 🎯