summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-hlsl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
-rw-r--r--source/slang/slang-emit-hlsl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp
index adca798e6..72b2a08b0 100644
--- a/source/slang/slang-emit-hlsl.cpp
+++ b/source/slang/slang-emit-hlsl.cpp
@@ -714,7 +714,7 @@ bool HLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu
m_writer->emit("(");
emitOperand(inst->getOperand(1), getInfo(EmitOp::General));
m_writer->emit(", ");
- emitOperand(inst->getOperand(2), getInfo(EmitOp::General));
+ emitOperand(inst->getOperand(inst->getOperandCount() - 1), getInfo(EmitOp::General));
m_writer->emit(")");
maybeCloseParens(needClose);