diff options
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index bfc021677..6f97a11da 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -1547,9 +1547,10 @@ bool CPPSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOut auto base = inst->getOperand(0); auto outerPrec = getInfo(EmitOp::General); emitOperand(base, outerPrec); + m_writer->emit(")"); m_writer->emit("["); emitOperand(inst->getOperand(1), EmitOpInfo()); - m_writer->emit("]))"); + m_writer->emit("])"); return true; } case kIROp_swizzle: |
