From 5df9db015c86882e15fbe468318b4778083dc0cf Mon Sep 17 00:00:00 2001 From: "Meredith L. Patterson" Date: Wed, 20 Feb 2013 22:08:05 -0500 Subject: [PATCH] h_ch's return type is uint, not bytes; fixed validate_test_ab accordingly, even though it worked before with the wrong union member name (probably because token is the first thing in the struct). Oh C, stay classy. --- src/t_parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/t_parser.c b/src/t_parser.c index 3654030..13c4bdf 100644 --- a/src/t_parser.c +++ b/src/t_parser.c @@ -350,7 +350,11 @@ static void test_epsilon_p(void) { bool validate_test_ab(HParseResult *p) { if (TT_SEQUENCE != p->ast->token_type) return false; - return (p->ast->seq->elements[0]->bytes.token == p->ast->seq->elements[1]->bytes.token); + if (TT_UINT != p->ast->seq->elements[0]->token_type) + return false; + if (TT_UINT != p->ast->seq->elements[1]->token_type) + return false; + return (p->ast->seq->elements[0]->uint == p->ast->seq->elements[1]->uint); } static void test_attr_bool(void) {