dbghelp: In const types, force 'void' type when none is found.
authorEric Pouech <eric.pouech@orange.fr>
Sat, 26 Mar 2011 11:16:45 +0000 (12:16 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 28 Mar 2011 15:24:50 +0000 (17:24 +0200)
dlls/dbghelp/dwarf.c

index f0eabaf90b13346594a4824b8f9df1cfde0e270d..1f8d4a7bc1c9e3af075f51d647d52694808f6b99 100644 (file)
@@ -1317,9 +1317,13 @@ static struct symt* dwarf2_parse_volatile_type(dwarf2_parse_context_t* ctx,
 
     if (di->symt) return di->symt;
 
-    TRACE("%s, for %s\n", dwarf2_debug_ctx(ctx), dwarf2_debug_di(di)); 
+    TRACE("%s, for %s\n", dwarf2_debug_ctx(ctx), dwarf2_debug_di(di));
 
-    ref_type = dwarf2_lookup_type(ctx, di);
+    if (!(ref_type = dwarf2_lookup_type(ctx, di)))
+    {
+        ref_type = ctx->symt_cache[sc_void];
+        assert(ref_type);
+    }
     if (dwarf2_get_di_children(ctx, di)) FIXME("Unsupported children\n");
     di->symt = ref_type;