Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
eece2c96
Unverified
Commit
eece2c96
authored
Feb 16, 2020
by
Yuri Roubinsky
Committed by
GitHub
Feb 16, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #36251 from Chaosus/fix_struct_crash
Fix shader crash if duplicated struct members created
parents
cb68d832
a1da8560
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
shader_language.cpp
servers/visual/shader_language.cpp
+7
-1
No files found.
servers/visual/shader_language.cpp
View file @
eece2c96
...
...
@@ -5675,7 +5675,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
st
.
shader_struct
=
st_node
;
int
member_count
=
0
;
Set
<
String
>
member_names
;
while
(
true
)
{
// variables list
tk
=
_get_token
();
if
(
tk
.
type
==
TK_CURLY_BRACKET_CLOSE
)
{
...
...
@@ -5732,6 +5732,12 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
member
->
struct_name
=
struct_name
;
member
->
name
=
tk
.
text
;
if
(
member_names
.
has
(
member
->
name
))
{
_set_error
(
"Redefinition of '"
+
String
(
member
->
name
)
+
"'"
);
return
ERR_PARSE_ERROR
;
}
member_names
.
insert
(
member
->
name
);
tk
=
_get_token
();
if
(
tk
.
type
==
TK_BRACKET_OPEN
)
{
tk
=
_get_token
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment