Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shader parse error with \r new-lines #1546

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

VReaperV
Copy link
Contributor

@VReaperV VReaperV commented Feb 8, 2025

Fixes a shader stage parsing error on https://users.unvanquished.net/~sweet/pkg/map-monk_0%2B0.dpk.

@slipher
Copy link
Member

slipher commented Feb 8, 2025

gantry is another map exhibiting this issue.

Counting both \r and \n as newlines will mess up the line counter for other parsers for files using CRLF. How about replacing \r with \n in COM_Compress instead? That function is used only for shaders, and the shader parser doesn't use line numbers.

Fixes a shader stage parsing error on https://users.unvanquished.net/~sweet/pkg/map-monk_0%2B0.dpk by changing `\r` new-lines in shaders to `\n`.
@VReaperV
Copy link
Contributor Author

That makes sense, I changed this to modify COM_Compress() now instead.

@slipher
Copy link
Member

slipher commented Feb 11, 2025

LGTM

@VReaperV VReaperV merged commit 55bf481 into DaemonEngine:master Feb 11, 2025
9 checks passed
@VReaperV VReaperV deleted the fix-newline branch February 11, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants