From 328563488a2b61870f999cd7499df4665ca13bef Mon Sep 17 00:00:00 2001 From: DRovara Date: Thu, 19 Sep 2024 16:36:24 +0200 Subject: [PATCH] fix: :bug: Fix bug that makes debugger access element -1 if no custom gates are defined --- src/backend/dd/DDSimDebug.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/dd/DDSimDebug.cpp b/src/backend/dd/DDSimDebug.cpp index 98b733a..f90bd2b 100644 --- a/src/backend/dd/DDSimDebug.cpp +++ b/src/backend/dd/DDSimDebug.cpp @@ -870,6 +870,9 @@ std::vector getTargetVariables(DDSimulationState* ddsim, if (ddsim->instructionTypes[i] == RETURN) { break; } + if (i == 0) { + break; + } i--; }