1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00

Fixed potential endless-loop in id generation

This commit is contained in:
Darth Affe 2022-11-14 19:20:13 +01:00
parent 8adeaab54d
commit a2646ae43c

View File

@ -43,7 +43,7 @@ public static class IdGenerator
{
mappedId = id;
int mappingCounter = 1;
while (_registeredIds.Contains(id))
while (_registeredIds.Contains(mappedId))
mappedId = $"{id} ({++mappingCounter})";
_registeredIds.Add(mappedId);