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