From 5828f7da07ea4f960c3cc575972b39bf6ddcb299 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Tue, 22 Nov 2011 15:34:03 -0800 Subject: [PATCH] Fix bugs in ArrayType::GetString() and GetCDeclaration() --- type.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/type.cpp b/type.cpp index 41b1e78a..f8fa41ac 100644 --- a/type.cpp +++ b/type.cpp @@ -1012,7 +1012,7 @@ ArrayType::GetString() const { // dimensions while (at) { char buf[16]; - if (numElements > 0) + if (at->numElements > 0) sprintf(buf, "%d", at->numElements); else buf[0] = '\0'; @@ -1044,7 +1044,7 @@ ArrayType::GetCDeclaration(const std::string &name) const { const ArrayType *at = this; while (at) { char buf[16]; - if (numElements > 0) + if (at->numElements > 0) sprintf(buf, "%d", at->numElements); else buf[0] = '\0';