scripts: GH1383, Fix Dota2 issue with safe_structs
authorMark Lobodzinski <mark@lunarg.com>
Wed, 18 Jan 2017 18:05:48 +0000 (11:05 -0700)
committerMark Lobodzinski <mark@lunarg.com>
Wed, 18 Jan 2017 18:34:44 +0000 (11:34 -0700)
Change-Id: I158a86639ec802e47f3a87a95af8cf20d1cffbf5

scripts/helper_file_generator.py

index 7612dab..3340faf 100644 (file)
@@ -592,7 +592,7 @@ class HelperFileOutputGenerator(OutputGenerator):
                         init_list += '\n    %s(nullptr),' % (member.name)
                         init_func_txt += '    %s = nullptr;\n' % (member.name)
                         if 'pNext' != member.name and 'void' not in m_type:
-                            if not member.isstaticarray and member.len is None:
+                            if not member.isstaticarray and (member.len is None or '/' in member.len):
                                 construct_txt += '    if (in_struct->%s) {\n' % member.name
                                 construct_txt += '        %s = new %s(*in_struct->%s);\n' % (member.name, m_type, member.name)
                                 construct_txt += '    }\n'