]> git.tdb.fi Git - gldbg.git/commitdiff
Quick hack to not crash when printing enum arrays
authorMikko Rasa <tdb@tdb.fi>
Tue, 22 Jun 2010 10:12:26 +0000 (10:12 +0000)
committerMikko Rasa <tdb@tdb.fi>
Tue, 22 Jun 2010 10:12:26 +0000 (10:12 +0000)
source/glprint.funcs.t

index cc459790308eab864af19aebd93804dd3c181426..d98f6e72102389bd6cac9a78a5fb79af8fdde7da 100644 (file)
@@ -45,7 +45,10 @@ for p in params+[ret]:
                        elif p.base_ctype=="GLvoid" or p.base_ctype=="void":
                                w(', print_data(%s, %s)', p.name, p.csize)
                        else:
                        elif p.base_ctype=="GLvoid" or p.base_ctype=="void":
                                w(', print_data(%s, %s)', p.name, p.csize)
                        else:
-                               w(', print_array("%s", %s, sizeof(%s), %s)', p.io[1], p.name, p.base_ctype, p.csize)
+                               f = p.io[1]
+                               if len(p.io)>=3 and p.io[2]:
+                                       f = "%x"
+                               w(', print_array("%s", %s, sizeof(%s), %s)', f, p.name, p.base_ctype, p.csize)
 wl(');')
 wl('}')
 :static void init_print(GlDecoder *dec)
 wl(');')
 wl('}')
 :static void init_print(GlDecoder *dec)