Stricter content parsing

This commit is contained in:
Wilson Lin 2018-08-04 16:11:11 +12:00
parent a4edc1886a
commit 9f632dd2ae
2 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@
typedef enum hbe_errcode {
HBE_INTERR_PEEK_OFFSET_GEQ_ZERO = 1,
HBE_INTERR_UNKNOWN_ENTITY_TYPE,
HBE_INTERR_UNKNOWN_CONTENT_NEXT_STATE,
HBE_CLI_TOO_MANY_OPTIONS = 17,
HBE_CLI_INVALID_TAG_SET,

View File

@ -63,6 +63,7 @@ void hbs_content(hbs_options_t so, hbu_pipe_t pipe, hb_char_t *parent) {
next_state = HBS_CONTENT_NEXT_STATE_ENTITY;
} else {
// Text
next_state = HBS_CONTENT_NEXT_STATE_TEXT;
}
@ -120,6 +121,9 @@ void hbs_content(hbs_options_t so, hbu_pipe_t pipe, hb_char_t *parent) {
case HBS_CONTENT_NEXT_STATE_END:
return;
default:
hbe_fatal(HBE_INTERR_UNKNOWN_CONTENT_NEXT_STATE, "INTERR $next_state is not a known upcoming content stream state");
}
}