Fixing array pop (#458)
This commit is contained in:
parent
07f86be501
commit
204ec41823
@ -269,9 +269,9 @@ namespace pxt {
|
|||||||
|
|
||||||
if (length > 0)
|
if (length > 0)
|
||||||
{
|
{
|
||||||
|
--length;
|
||||||
uint32_t value = data[length];
|
uint32_t value = data[length];
|
||||||
data[length] = Segment::DefaultValue;
|
data[length] = Segment::DefaultValue;
|
||||||
--length;
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
return Segment::DefaultValue;
|
return Segment::DefaultValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user