Merge pull request #277 from DarthAffe/Core/IdGenerationFix

Fixed potential endless-loop in id generation
This commit is contained in:
DarthAffe authored and GitHub committed 2022-11-14 19:23:43 +01:00
commit 5ba98d3dcd
1 file changed
+1 -1
+1 -1
View File
@@ -43,7 +43,7 @@ public static class IdGenerator
{ {
mappedId = id; mappedId = id;
int mappingCounter = 1; int mappingCounter = 1;
while (_registeredIds.Contains(id)) while (_registeredIds.Contains(mappedId))
mappedId = $"{id} ({++mappingCounter})"; mappedId = $"{id} ({++mappingCounter})";
_registeredIds.Add(mappedId); _registeredIds.Add(mappedId);