Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

fix: Infinite loop issue #507

Merged
merged 1 commit into from
Oct 19, 2017
Merged

fix: Infinite loop issue #507

merged 1 commit into from
Oct 19, 2017

Conversation

pksunkara
Copy link
Contributor

Snowcrash should give out a circular reference error when an attirbutes
section is reference itself even when a description header node is present
before it.

This is actually a better fix for #328 than the one we did in #329

Snowcrash should give out a circular reference error when an attirbutes
section is reference itself even when a description header node is present
before it.
@@ -181,7 +181,8 @@ namespace snowcrash

contextSectionType = sectionType;
contextCur = cur;
} else if (contextSectionType != DataStructureGroupSectionType) {
} else if (contextSectionType != DataStructureGroupSectionType
&& SectionProcessor<Action>::sectionType(cur) == ActionSectionType) {
Copy link
Member

@kylef kylef Oct 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering what the difference would be between SectionProcessor<Action>::sectionType(cur) == ActionSectionType and sectionType == ActionSectionType. Could you please explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sectionType will be UndefinedSectionType because in BlueprintParser's nestedSectionType(), we don't check for ActionType since it is not a direct child of Blueprint.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is still passing with this though: d92137c

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember other tests failing with that. It is the first thing I tried too.

@pksunkara pksunkara merged commit e8d6909 into master Oct 19, 2017
@pksunkara pksunkara deleted the pksunkara/infinite-loop branch October 19, 2017 17:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants