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

Merge pull request #277 from DarthAffe/Core/IdGenerationFix

Fixed potential endless-loop in id generation
This commit is contained in:
DarthAffe 2022-11-14 19:23:43 +01:00 committed by GitHub
commit 5ba98d3dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);