mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 04:57:15 +00:00
Fixed potential endless-loop in id generation
This commit is contained in:
1 parent
8adeaab54d
commit
a2646ae43c
1 file changed
+1
-1
@@ -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);
|
||||||
|
|||||||
Reference in new issue
Block a user