Skip to content

[GEN] Dereferencing iterators of empty containers, which is throwing STL library asserts under debug #536

Closed
@Mauller

Description

@Mauller

Area(s) with this issue?

No response

Describe the issue

This occurs in VS22, not tested with debug on VC6.

There is code within PartitionManager.cpp and OpenContain.cpp where empty iterators are being dereferenced.

PartitionManager.cpp - 5491 - dereferencing iterator of empty container - casues STL library assert under debug.
OpenContain.cpp - 1288 - dereferencing iterator of empty container - casues STL library assert under debug.

The code is assuming a null returning iterator to control logic. Some guards around this code checking the size of the container may be required.

This is throwing STL library asserts when under DEBUG.

This is likely a hangover from the use of STLPORT style container classes.

Steps to reproduce

Run Generals under debug in VS22

Attachments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is not working rightCriticalSeverity: Minor < Major < Critical < BlockerDebugIs mostly debug functionalityGenRelates to Generals

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions