Skip to content

Fix HLSLParser: Always check preprocessor directive stack#994

Open
kblaschke wants to merge 1 commit intoprojectM-visualizer:masterfrom
kblaschke:fix/hlslparser-unmatched-preprocessor-directives
Open

Fix HLSLParser: Always check preprocessor directive stack#994
kblaschke wants to merge 1 commit intoprojectM-visualizer:masterfrom
kblaschke:fix/hlslparser-unmatched-preprocessor-directives

Conversation

@kblaschke
Copy link
Copy Markdown
Member

Was previously dereferencing the top element without checking for the stack to be empty (e.g. if there are mismatched preprocessor directives). The loop now aborts if there is at least one more closing directive (e.g. #endif) than opening ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug The issue is (potentially) a bug.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant