From 3e98c25cc284668f33bd6e18d2e4d8655418ee59 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 25 Oct 2023 06:23:49 +1100 Subject: [PATCH] Fix bug processing snapshot --- .../hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java index cc183f65d..58c20fa1a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfilePathProcessor.java @@ -165,7 +165,7 @@ public class ProfilePathProcessor { ElementDefinition res = null; List typeList = new ArrayList<>(); // just repeat processing entries until we run out of our allowed scope (1st entry, the allowed scope is all the entries) - while (cursors.baseCursor <= getBaseLimit()) { + while (cursors.baseCursor <= getBaseLimit() && cursors.baseCursor < cursors.base.getElement().size()) { // get the current focus of the base, and decide what to do ElementDefinition currentBase = cursors.base.getElement().get(cursors.baseCursor); String currentBasePath = profileUtilities.fixedPathSource(getContextPathSource(), currentBase.getPath(), getRedirector());