From 0205804a10fe3beb01ed0135fde052d13b045570 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 22 Jun 2010 10:12:26 +0000 Subject: [PATCH] Quick hack to not crash when printing enum arrays --- source/glprint.funcs.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.45.2