From 5acbeb698e933faef746d2e09c3e485ce456c03d Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 26 Jan 2005 21:22:27 +0000 Subject: [PATCH] fix typedef array parameters --- direct/src/dcparser/dcArrayParameter.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/direct/src/dcparser/dcArrayParameter.cxx b/direct/src/dcparser/dcArrayParameter.cxx index 3873be7bd5..7a4ba4adb3 100644 --- a/direct/src/dcparser/dcArrayParameter.cxx +++ b/direct/src/dcparser/dcArrayParameter.cxx @@ -166,6 +166,12 @@ get_array_size() const { //////////////////////////////////////////////////////////////////// DCParameter *DCArrayParameter:: append_array_specification(const DCUnsignedIntRange &size) { + if (get_typedef() != (DCTypedef *)NULL) { + // If this was a typedef, wrap it directly. + return new DCArrayParameter(this, size); + } + + // Otherwise, the brackets get applied to the inner type. _element_type = _element_type->append_array_specification(size); return this; }