From 82a2aea03f0e15a85937a19848b76d1b74a4a809 Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Thu, 10 Jul 2008 20:43:26 +0000 Subject: [PATCH] c_structdef_cg.pm: Fix an error where we forgot to use the \{"name"\} member of the hash thus resulting in bad code being generated git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5478 4a71c877-e1ca-e34f-864e-861f7616d084 --- build_tools/code-generators/c_structdef_cg.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/code-generators/c_structdef_cg.pm b/build_tools/code-generators/c_structdef_cg.pm index 6b0efdf73..33fcd36a6 100644 --- a/build_tools/code-generators/c_structdef_cg.pm +++ b/build_tools/code-generators/c_structdef_cg.pm @@ -21,7 +21,7 @@ sub printStructFieldType elsif (/real/) { $$output .= "float "; } elsif (/bool/) { $$output .= "bool "; } elsif (/set/) { $$output .= "bool "; } - elsif (/enum/) { $$output .= "${$field}{\"enum\"} "; } + elsif (/enum/) { $$output .= "${${$field}{\"enum\"}}{\"name\"} "; } elsif (/IMD_model/) { $$output .= "iIMDShape* "; } elsif (/C-only-field/) { $$output .= "${$field}{\"ctype\"} "; } else { die "UKNOWN TYPE: $_"; }