This pull request should fix #232.
Pass field name instead of struct name as nameprefix for nested structures. Continuously concatenate nameprefix arguments to support deeper nested structures.
// don't clash, and to make it obvious these arguments are constructing
// a nested struct, prefix the name with the struct name.
GenStructArgs(lang, *field.value.type.struct_def, code_ptr,
- (field.value.type.struct_def->name + "_").c_str());
+ (nameprefix + (field.name + "_")).c_str());
} else {
code += ", ";
code += GenTypeForUser(lang,