Fix removing keys in Dictionary with string keys
This commit is contained in:
@@ -333,7 +333,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
{
|
||||
foreach (var e in dictionary.Keys)
|
||||
{
|
||||
if (e == key)
|
||||
if (Equals(e, key))
|
||||
continue;
|
||||
newValues[e] = dictionary[e];
|
||||
}
|
||||
@@ -408,7 +408,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
foreach (var e in newValues.Keys)
|
||||
{
|
||||
var asLong = Convert.ToInt64(e);
|
||||
if (asLong == uniqueKey)
|
||||
if (asLong.Equals(uniqueKey))
|
||||
{
|
||||
uniqueKey++;
|
||||
isUnique = false;
|
||||
@@ -449,7 +449,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
isUnique = true;
|
||||
foreach (var e in newValues.Keys)
|
||||
{
|
||||
if ((string)e == uniqueKey)
|
||||
if (string.Equals((string)e, uniqueKey, StringComparison.InvariantCulture))
|
||||
{
|
||||
uniqueKey += "*";
|
||||
isUnique = false;
|
||||
|
||||
Reference in New Issue
Block a user