From 12a312b6b498f7d03213d15906d04ac5f500138a Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 7 Aug 2013 20:04:05 -0500 Subject: [PATCH] - Fixed: NewArray returned the element type, not the array type. --- src/dobjtype.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index 7f6d24352..fd856bca3 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -640,9 +640,9 @@ PArray *NewArray(PType *type, unsigned int count) if (atype == NULL) { atype = new PArray(type, count); - TypeTable.AddType(type, RUNTIME_CLASS(PArray), (intptr_t)type, count, bucket); + TypeTable.AddType(atype, RUNTIME_CLASS(PArray), (intptr_t)type, count, bucket); } - return (PArray *)type; + return (PArray *)atype; } /* PVector ****************************************************************/