Skip to content

Commit

Permalink
fixed #2563
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Aug 31, 2023
1 parent 540c883 commit 112767e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scene_manager/loader_bt.c
Expand Up @@ -3291,8 +3291,12 @@ GF_Err gf_bt_loader_run_intern(GF_BTParser *parser, GF_Command *init_com, Bool i
str = gf_bt_get_next(parser, 0);
if (parser->done) break;

if (!strcmp(str, "")) {
//empty string, force moving to next char
if (parser->line_pos<parser->line_size) parser->line_pos++;
}
/*X3D specific things (ignored for now)*/
if (!strcmp(str, "PROFILE")) gf_bt_force_line(parser);
else if (!strcmp(str, "PROFILE")) gf_bt_force_line(parser);
else if (!strcmp(str, "COMPONENT")) gf_bt_force_line(parser);
else if (!strcmp(str, "META")) gf_bt_force_line(parser);
else if (!strcmp(str, "IMPORT") || !strcmp(str, "EXPORT")) {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/xml_parser.c
Expand Up @@ -1042,11 +1042,13 @@ static GF_Err gf_xml_sax_parse_intern(GF_SAXParser *parser, char *current)
ent = gf_xml_locate_entity(parser, name, &needs_text);
gf_free(name);

//entity not found, parse as regular string
if (!ent && !needs_text) {
xml_sax_append_string(parser, current);
xml_sax_parse(parser, GF_TRUE);
entityEnd[0] = ';';
current = entityEnd;
parser->in_entity = GF_FALSE;
continue;
}
assert(ent);
Expand Down

0 comments on commit 112767e

Please sign in to comment.