Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Issue] Flyover a bridge with a WiGE won't collapse bridge due to Out Of Bounds exception #7040

@Scoppio

Description

@Scoppio

Brief Description *

A bridge whose CF is lower than or equal to 1/4 the WiGE weight must collapse under it's size/load during a fly-over, however, due to an off-by-one mistake in code the function that checks if the building will collapse tries to reach for an element in an array at the position -1, causing an out of bounds exception.

3. Steps to Reproduce

No response

Attach Files

No response

Severity *

Critical (Game-breaking/Crash): The game crashes or a core feature (like saving, loading, or network connection) is completely unusable.

MegaMek Suite Version *

0.50.06-nightly

Operating System *

MacOS Sequoia 15.4.1

Java Version *

OpenJDK Runtime Environment GraalVM CE 23.0.2+7.1

Final Verification

  • I confirm this is a single, unique issue that hasn't been reported before
  • I have included all necessary information and files to help reproduce this issue
  • I have asked on MegaMek Discord about this issue
  • I have confirmed this issue is being opened on the correct repository: MegaMek, MegaMekLab, or MekHQ

Metadata

Metadata

Assignees

Labels

BugAny kind of issue that cannot be fixed without code changesSeverity: MediumIssues described as medium severity as per the new issue form

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions