From a95ab58e79c50b0927eae2b834d3de20a8effc36 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 28 Nov 2009 15:38:29 -0800 Subject: Overhaul defs to derive from a common base. --- src/upb_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/upb_mm.c') diff --git a/src/upb_mm.c b/src/upb_mm.c index cad1158..60809a5 100644 --- a/src/upb_mm.c +++ b/src/upb_mm.c @@ -47,7 +47,7 @@ static union upb_mmptr upb_mm_newptr(upb_mm_ptrtype type, { union upb_mmptr p = {NULL}; switch(type) { - case UPB_MM_MSG_REF: p.msg = upb_msg_new(f->ref.msg); + case UPB_MM_MSG_REF: p.msg = upb_msg_new(upb_downcast_msgdef(f->def)); case UPB_MM_STR_REF: p.str = upb_string_new(); case UPB_MM_ARR_REF: p.arr = upb_array_new(f); default: assert(false); break; -- cgit v1.2.3