Fix declarations of pointers to arrays

This commit is contained in:
baldurk
2016-02-07 18:41:54 +01:00
parent 8246bdb61e
commit aa93f523ca
@@ -209,7 +209,9 @@ struct SPVTypeData
ret += decorations[d].Str() + " ";
}
if(type == eArray)
if(type == ePointer && baseType->type == eArray)
ret += StringFormat::Fmt("%s* %s[%u]", baseType->baseType->GetName().c_str(), varName.c_str(), baseType->arraySize);
else if(type == eArray)
ret += StringFormat::Fmt("%s %s[%u]", baseType->GetName().c_str(), varName.c_str(), arraySize);
else
ret += StringFormat::Fmt("%s %s", GetName().c_str(), varName.c_str());