Fix bugs in ArrayType::GetString() and GetCDeclaration()

This commit is contained in:
Matt Pharr
2011-11-22 15:34:03 -08:00
parent d3e6879223
commit 5828f7da07

View File

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