diff --git a/visa/G4_Kernel.cpp b/visa/G4_Kernel.cpp index 43f90d5f55ed..470e6af9da2d 100644 --- a/visa/G4_Kernel.cpp +++ b/visa/G4_Kernel.cpp @@ -210,9 +210,9 @@ void *gtPinData::getIndirRefs(unsigned int &size) { unsigned int offset = 0; write(buffer, numRanges, offset); for (auto &item : indirRefMap) { - vISA_ASSERT(offset < size, "Out of bounds"); - write(buffer, item.first, offset); for (const auto &arg : item.second) { + vISA_ASSERT(offset < size, "Out of bounds"); + write(buffer, item.first, offset); vISA_ASSERT(offset < size, "Out of bounds"); write(buffer, arg.first, offset); vISA_ASSERT(offset < size, "Out of bounds");