diff --git a/src/Configuration.cpp b/src/Configuration.cpp index 16a57e973a15f2a224716c1c447acff18446c951..51679b9456b329a5be858f5597046d817ae35ece 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -1700,6 +1700,11 @@ bool Configuration::readTableFile(const String& value, int currTab) { return false; } + if (currTab >= numParts*numParts) { + printf("ERROR: Number of tabulatedFile entries exceeded %d*%d particle types.\n", numParts,numParts); + exit(1); + } + partTableIndex0[currTab] = atoi(tokenList[0]); partTableIndex1[currTab] = atoi(tokenList[1]); partTableFile[currTab] = tokenList[2];