From 086cf1458c6000a01e6c9ff44cc5da30cd65d145 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Thu, 29 Nov 2012 17:12:00 +0100 Subject: [PATCH] When processing nested structure pointer variables ecpg always expected an array datatype which of course is wrong. Applied patch by Muhammad Usama to fix this. --- src/interfaces/ecpg/preproc/variable.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/interfaces/ecpg/preproc/variable.c b/src/interfaces/ecpg/preproc/variable.c index e08e14ac18..6ff574bbd9 100644 --- a/src/interfaces/ecpg/preproc/variable.c +++ b/src/interfaces/ecpg/preproc/variable.c @@ -100,7 +100,11 @@ find_struct_member(char *name, char *str, struct ECPGstruct_member * members, in } break; case '-': - return (find_struct_member(name, end, members->type->u.element->u.members, brace_level)); + if (members->type->type == ECPGt_array) + return (find_struct_member(name, ++end, members->type->u.element->u.members, brace_level)); + else + return (find_struct_member(name, ++end, members->type->u.members, brace_level)); + break; break; case '.': if (members->type->type == ECPGt_array)