aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobin Ehlis <tobin@lunarg.com>2015-06-30 15:28:00 -0600
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-07-07 15:58:00 -0600
commite291354abe5eff9de35075020c7bbc00d4d7cf0e (patch)
tree5bf099c38e5bde59828d08d1ec5e4a93bda58421
parent52d9c50dfb44d3297dec3f6ec0bc3c73cf828993 (diff)
downloadusermoji-e291354abe5eff9de35075020c7bbc00d4d7cf0e.tar.xz
layers: Fix codegen for printing arrays of char* strings
-rwxr-xr-xvk_helper.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/vk_helper.py b/vk_helper.py
index 46daad5f..9e5b2e63 100755
--- a/vk_helper.py
+++ b/vk_helper.py
@@ -787,7 +787,7 @@ class StructWrapperGen:
addr_char = '&'
if 1 < stp_list[index]['full_type'].count('*'):
addr_char = ''
- if (stp_list[index]['array'] and 'char' not in stp_list[index]['type']):
+ if stp_list[index]['array']:
sh_funcs.append('%s' % lineinfo.get())
if stp_list[index]['dyn_array']:
sh_funcs.append('%s' % lineinfo.get())
@@ -835,7 +835,8 @@ class StructWrapperGen:
sh_funcs.append('%s}' % (indent))
elif (stp_list[index]['ptr']):
sh_funcs.append('%s' % lineinfo.get())
- sh_funcs.append(' if (pStruct->%s) {' % stp_list[index]['name'])
+ sh_funcs.append('%sif (pStruct->%s) {' % (indent, stp_list[index]['name']))
+ indent += ' '
if 'pNext' == stp_list[index]['name']:
sh_funcs.append('%s' % lineinfo.get())
sh_funcs.append(' tmp_str = dynamic_display((void*)pStruct->pNext, prefix);')