Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Index Out-of-Bounds Error During eraMods Parsing #4577

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

IllianiCBT
Copy link
Collaborator

Adjusted the era mod loop to iterate based on the length of the eraMods array instead of the values array. This change prevents potential index out-of-bounds exceptions and ensures all elements in eraMods are correctly assigned.

Adjusted the era mod loop to iterate based on the length of the `eraMods` array instead of the `values` array. This change prevents potential index out-of-bounds exceptions and ensures all elements in eraMods are correctly assigned.
@IllianiCBT IllianiCBT added the Bug label Aug 8, 2024
@IllianiCBT IllianiCBT self-assigned this Aug 8, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.31%. Comparing base (9f347ae) to head (8bc27c0).
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4577      +/-   ##
============================================
- Coverage     10.32%   10.31%   -0.01%     
  Complexity     5818     5818              
============================================
  Files           936      936              
  Lines        128888   128888              
  Branches      18960    18960              
============================================
- Hits          13302    13300       -2     
- Misses       114310   114312       +2     
  Partials       1276     1276              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Updated the eraMods array initialization to dynamically adjust its size based on the number of elements in the input string. This change prevents potential ArrayIndexOutOfBoundsException errors when the number of eraMods values changes.
@IllianiCBT IllianiCBT merged commit 16d8a5f into MegaMek:master Aug 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants