summaryrefslogtreecommitdiff
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index ce9ff323b8..363d2bf5d2 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -1081,7 +1081,8 @@ cmState::Snapshot cmState::Snapshot::GetCallStackParent() const
Snapshot snapshot;
PositionType parentPos = this->Position;
- while(parentPos->SnapshotType == cmState::PolicyScopeType)
+ while (parentPos->SnapshotType == cmState::PolicyScopeType ||
+ parentPos->SnapshotType == cmState::VariableScopeType)
{
++parentPos;
}
@@ -1092,7 +1093,8 @@ cmState::Snapshot cmState::Snapshot::GetCallStackParent() const
}
++parentPos;
- while(parentPos->SnapshotType == cmState::PolicyScopeType)
+ while (parentPos->SnapshotType == cmState::PolicyScopeType ||
+ parentPos->SnapshotType == cmState::VariableScopeType)
{
++parentPos;
}