Closed SpecLad closed 3 weeks ago
If it points to the last element of penalty, the resize call invalidates it, and the subsequent call to emplace is undefined. This causes a crash in MSVC debug mode.
it
penalty
resize
emplace
Fix it by resizing after emplacing.
If
it
points to the last element ofpenalty
, theresize
call invalidates it, and the subsequent call toemplace
is undefined. This causes a crash in MSVC debug mode.Fix it by resizing after emplacing.