Commit 70661b9c by Dan Sinclair

Handle potentially uninitialized result

parent d509a5ee
...@@ -7302,6 +7302,10 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n ...@@ -7302,6 +7302,10 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n
} else if (auto* const_union_array = &sn->getConstArray()) { } else if (auto* const_union_array = &sn->getConstArray()) {
int nextConst = 0; int nextConst = 0;
result = createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true); result = createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true);
} else {
logger->missingFunctionality("Invalid initializer for spec onstant.");
exit(1);
return spv::NoResult;
} }
builder.addName(result, sn->getName().c_str()); builder.addName(result, sn->getName().c_str());
return result; return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment