Fix case where shader type from file is unknown
The variable was previously uninitialized, so the value may not have necessarily been zero for the comparison that follows.
This commit is contained in:
parent
d481aa4d19
commit
9df2f0c64f
|
@ -200,6 +200,9 @@ int loadShadersFromFile(const char* file_path, struct ShaderRegistry *registry)
|
|||
else if(strcmp("geometry", type) == 0) {
|
||||
shader_type = geometry;
|
||||
}
|
||||
else {
|
||||
shader_type = 0;
|
||||
}
|
||||
|
||||
if(shader_type == 0) {
|
||||
// Invalid line, unknown type.
|
||||
|
|
Loading…
Reference in New Issue