mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] Ensure keys returned are immutable
This commit is contained in:
@@ -1329,7 +1329,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the keys from the file dictionary
|
/// Get the keys from the file dictionary
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>IEnumerable of the keys</returns>
|
/// <returns>List of the keys</returns>
|
||||||
public List<string> Keys
|
public List<string> Keys
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -1342,7 +1342,7 @@ namespace SabreTools.Library.DatFiles
|
|||||||
|
|
||||||
lock (_items)
|
lock (_items)
|
||||||
{
|
{
|
||||||
return _items.Keys.ToList();
|
return _items.Keys.Select(item => (String)item.Clone()).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user