diff options
-rw-r--r-- | util/spd_tools/src/part_id_gen/part_id_gen.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/spd_tools/src/part_id_gen/part_id_gen.go b/util/spd_tools/src/part_id_gen/part_id_gen.go index 3db2b6e8d9..7803361e48 100644 --- a/util/spd_tools/src/part_id_gen/part_id_gen.go +++ b/util/spd_tools/src/part_id_gen/part_id_gen.go @@ -240,6 +240,9 @@ func genPartIdInfo(parts []usedPart, partToSPDMap map[string]string, SPDToIndexM // Append new entry if index == -1 { index = len(partIdList) + if index > MaxMemoryId { + return nil, fmt.Errorf("Maximum part ID %d exceeded.", MaxMemoryId) + } partIdList = append(partIdList, partIds{}) } |