Sync to wine-1.1.1 (Patch 3 of 10):
authorEric Kohl <eric.kohl@reactos.org>
Wed, 19 Nov 2008 21:44:03 +0000 (21:44 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Wed, 19 Nov 2008 21:44:03 +0000 (21:44 +0000)
- Rob Shearman <robertshearman@gmail.com> Tue, 1 Jul 2008
widl: Check that the structure has been defined in check_remoting_args.

svn path=/trunk/; revision=37470

reactos/tools/widl/parser.tab.c
reactos/tools/widl/parser.y

index 99423d7..e2a3bb2 100644 (file)
@@ -5924,7 +5924,12 @@ static void check_remoting_fields(const var_t *var, type_t *type)
     type->checked = TRUE;
 
     if (is_struct(type->type))
-        fields = type->fields_or_args;
+    {
+        if (type->defined)
+            fields = type->fields_or_args;
+        else
+            error_loc_info(&var->loc_info, "undefined type declaration %s\n", type->name);
+    }
     else if (is_union(type->type))
     {
         if (type->type == RPC_FC_ENCAPSULATED_UNION)
index 3c0a5fe..68f969a 100644 (file)
@@ -2611,7 +2611,12 @@ static void check_remoting_fields(const var_t *var, type_t *type)
     type->checked = TRUE;
 
     if (is_struct(type->type))
-        fields = type->fields_or_args;
+    {
+        if (type->defined)
+            fields = type->fields_or_args;
+        else
+            error_loc_info(&var->loc_info, "undefined type declaration %s\n", type->name);
+    }
     else if (is_union(type->type))
     {
         if (type->type == RPC_FC_ENCAPSULATED_UNION)