Front end: Fix issue #374: put a limit on how big a type name can get.

This commit is contained in:
John Kessenich 2016-07-08 14:49:48 -06:00
parent 78a4557621
commit b501a7501c
3 changed files with 10 additions and 3 deletions

View file

@ -1553,6 +1553,13 @@ public:
if (structure) {
s.append("{");
for (size_t i = 0; i < structure->size(); ++i) {
if (s.size() > 3 * GlslangMaxTypeLength) {
// If we are getting too long, cut it short,
// just need to draw the line somewhere, as there is no limit to
// how large a struct/block type can get.
s.append("...");
break;
}
if (! (*structure)[i].type->hiddenMember()) {
s.append((*structure)[i].type->getCompleteString());
s.append(" ");