From a2646ae43c487cae88975d75421d74f59e2ff458 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Mon, 14 Nov 2022 19:20:13 +0100 Subject: [PATCH] Fixed potential endless-loop in id generation --- RGB.NET.Core/Ids/IdGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RGB.NET.Core/Ids/IdGenerator.cs b/RGB.NET.Core/Ids/IdGenerator.cs index 41c2070..99beaa6 100644 --- a/RGB.NET.Core/Ids/IdGenerator.cs +++ b/RGB.NET.Core/Ids/IdGenerator.cs @@ -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);