Fixed not being able to add to Userdata list
This commit is contained in:
parent
da10ac2f1a
commit
49531b5595
|
@ -85,16 +85,13 @@ namespace Upsilon.BaseTypes.UserData
|
|||
|
||||
index--;
|
||||
if (index > List.Count)
|
||||
{
|
||||
if (index == List.Count)
|
||||
{
|
||||
List.Add(value.ToCSharpObject());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(
|
||||
$"Tried adding an item to a list at position {index}, but list is only of length {List.Count}");
|
||||
}
|
||||
if (index == List.Count)
|
||||
{
|
||||
List.Add(value.ToCSharpObject());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue