From 674383094714e770a8bd230e5d0631bb4f8687f7 Mon Sep 17 00:00:00 2001 From: arseny30 Date: Wed, 19 Nov 2014 16:16:54 +0300 Subject: [PATCH] Wrong FLAG_DEFAULT_CONSTRUCTOR bugfix --- tl-parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tl-parser.c b/tl-parser.c index 2d528c1..e762c35 100644 --- a/tl-parser.c +++ b/tl-parser.c @@ -1171,9 +1171,10 @@ struct tl_constructor *tl_add_constructor (struct tl_type *a, const char *_id, i a->constructors[a->constructors_num ++] = t; if (*id != '_') { tl_constructor_tree = tree_insert_tl_constructor (tl_constructor_tree, t, lrand48 ()); + } else { + a->flags |= FLAG_DEFAULT_CONSTRUCTOR; } total_constructors_num ++; - a->flags |= FLAG_DEFAULT_CONSTRUCTOR; return t; }