Skip to content
Permalink
Browse files
Set nested array parent when creating array using labels.
Fixes old string representation for parent array being returned even after nested arrays are modified.
  • Loading branch information
PseudoKnight committed Jan 20, 2020
1 parent 78d3173 commit a74a09c4c146875734f730edaf379e65788fcd49
Showing 1 changed file with 5 additions and 1 deletion.
@@ -93,7 +93,11 @@ public CArray(Target t, int initialCapacity, Mixed... items) {
if(items != null) {
for(Mixed item : items) {
if(item instanceof CEntry) {
associativeArray.put(normalizeConstruct(((CEntry) item).ckey), ((CEntry) item).construct);
Mixed value = ((CEntry) item).construct;
associativeArray.put(normalizeConstruct(((CEntry) item).ckey), value);
if(value.isInstanceOf(CArray.TYPE)) {
((CArray) value).parent = this;
}
} else {
int max = Integer.MIN_VALUE;
for(String key : associativeArray.keySet()) {

0 comments on commit a74a09c

Please sign in to comment.