Fixing array pop (#458)

This commit is contained in:
Richard Knoll 2017-07-21 13:42:48 -05:00 committed by GitHub
parent 07f86be501
commit 204ec41823

View File

@ -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;