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 empty shader resource loading #81300

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

bitsawer
Copy link
Member

@bitsawer bitsawer commented Sep 4, 2023

Regression from #80705. String.parse_utf8() returns an error when given string size of 0 and null, so we have to manually check this first. Otherwise, loading a completely empty .gdshader or .gdshaderinc file will fail. The workaround is easy, just add a space or newline to the file using an external text editor and it will load normally again.

@bitsawer bitsawer added bug regression topic:shaders cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Sep 4, 2023
@bitsawer bitsawer added this to the 4.2 milestone Sep 4, 2023
@YuriSizov YuriSizov merged commit 3604b46 into godotengine:master Sep 5, 2023
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Sep 20, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.2.

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.

3 participants