Skip to content

[master/4.2] Fix HLSLParser: Always check preprocessor directive stack#994

Merged
kblaschke merged 1 commit into
projectM-visualizer:masterfrom
kblaschke:fix/hlslparser-unmatched-preprocessor-directives
May 8, 2026
Merged

[master/4.2] Fix HLSLParser: Always check preprocessor directive stack#994
kblaschke merged 1 commit into
projectM-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.

@kblaschke kblaschke force-pushed the fix/hlslparser-unmatched-preprocessor-directives branch from 45eae36 to 76c8ff7 Compare May 7, 2026 13:14
@rootnotez

Copy link
Copy Markdown

Might be worth making explicit that one PR puts these fixes on Master and one puts fixes on the 4.1.x branch.

@kblaschke kblaschke changed the title Fix HLSLParser: Always check preprocessor directive stack [master/4.2] Fix HLSLParser: Always check preprocessor directive stack May 8, 2026
@kblaschke kblaschke merged commit 76c8ff7 into projectM-visualizer:master May 8, 2026
41 checks passed
@kblaschke kblaschke deleted the fix/hlslparser-unmatched-preprocessor-directives branch May 8, 2026 12:04
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

Development

Successfully merging this pull request may close these issues.

3 participants