From: Mikko Rasa Date: Tue, 22 Jun 2010 10:12:26 +0000 (+0000) Subject: Quick hack to not crash when printing enum arrays X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=0205804a10fe3beb01ed0135fde052d13b045570;p=gldbg.git Quick hack to not crash when printing enum arrays --- diff --git a/source/glprint.funcs.t b/source/glprint.funcs.t index cc45979..d98f6e7 100644 --- a/source/glprint.funcs.t +++ b/source/glprint.funcs.t @@ -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: - 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)