From fc6e2a3c5fc76f83114368703d74e4a2aab4c909 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 6 Sep 2024 20:56:29 +0100 Subject: [PATCH] Tracerestrict: Fix deleting a slot changing the subtype of referencing actions --- src/tracerestrict.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tracerestrict.cpp b/src/tracerestrict.cpp index e53fe67c49..71cd3b23ef 100644 --- a/src/tracerestrict.cpp +++ b/src/tracerestrict.cpp @@ -2895,10 +2895,10 @@ void TraceRestrictRemoveSlotID(TraceRestrictSlotID index) for (size_t i = 0; i < prog->items.size(); i++) { TraceRestrictItem &item = prog->items[i]; // note this is a reference, if ((GetTraceRestrictType(item) == TRIT_SLOT || GetTraceRestrictType(item) == TRIT_COND_TRAIN_IN_SLOT) && GetTraceRestrictValue(item) == index) { - SetTraceRestrictValueDefault(item, TRVT_SLOT_INDEX); // this updates the instruction in-place + SetTraceRestrictValue(item, INVALID_TRACE_RESTRICT_SLOT_ID); // this updates the instruction in-place } if ((GetTraceRestrictType(item) == TRIT_COND_SLOT_OCCUPANCY) && GetTraceRestrictValue(item) == index) { - SetTraceRestrictValueDefault(item, TRVT_SLOT_INDEX_INT); // this updates the instruction in-place + SetTraceRestrictValue(item, INVALID_TRACE_RESTRICT_SLOT_ID); // this updates the instruction in-place } if (IsTraceRestrictDoubleItem(item)) i++; } @@ -3155,7 +3155,7 @@ void TraceRestrictRemoveCounterID(TraceRestrictCounterID index) for (size_t i = 0; i < prog->items.size(); i++) { TraceRestrictItem &item = prog->items[i]; // note this is a reference, if ((GetTraceRestrictType(item) == TRIT_COUNTER || GetTraceRestrictType(item) == TRIT_COND_COUNTER_VALUE) && GetTraceRestrictValue(item) == index) { - SetTraceRestrictValueDefault(item, TRVT_COUNTER_INDEX_INT); // this updates the instruction in-place + SetTraceRestrictValue(item, INVALID_TRACE_RESTRICT_COUNTER_ID); // this updates the instruction in-place } if (IsTraceRestrictDoubleItem(item)) i++; }