fix xml_theme_gen

This commit is contained in:
lixianjing 2020-12-08 15:20:04 +08:00
parent aa03da84fc
commit 88fff65dd1

View File

@ -262,6 +262,7 @@ static XmlBuilder* builder_init(xml_builder_t& b) {
b.level = 0;
b.style_name = TK_DEFAULT_STYLE;
b.widget_type = "";
b.is_property = FALSE;
return &(b.builder);
}
@ -270,8 +271,6 @@ uint32_t xml_gen_buff(const char* xml, uint8_t* output, uint32_t max_size) {
xml_builder_t b;
return_value_if_fail(xml != NULL && output != NULL, 0);
memset(&b, 0x00, sizeof(b));
XmlParser* parser = xml_parser_create();
xml_parser_set_builder(parser, builder_init(b));
xml_parser_parse(parser, xml, strlen(xml));
@ -293,8 +292,6 @@ bool xml_gen(const char* input_file, const char* output_file, const char* theme,
wbuffer_t wbuffer;
return_value_if_fail(input_file != NULL && output_file != NULL, false);
memset(&b, 0x00, sizeof(b));
wbuffer_init_extendable(&wbuffer);
XmlParser* parser = xml_parser_create();
xml_parser_set_builder(parser, builder_init(b));