mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 01:58:30 +00:00
Fixed potential endless-loop in id generation
This commit is contained in:
parent
8adeaab54d
commit
a2646ae43c
@ -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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user