diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/tokeniser2.c | 4 | ||||
-rw-r--r-- | test/tokeniser3.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/tokeniser2.c b/test/tokeniser2.c index f38f7ab..f468d1c 100644 --- a/test/tokeniser2.c +++ b/test/tokeniser2.c @@ -438,7 +438,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw) /* Expected token only contained part of the data * Calculate how much is left, then try again with * the next expected token */ - hubbub_token t; + hubbub_token t = *token; t.type = HUBBUB_TOKEN_CHARACTER; t.data.character.ptr += len; @@ -446,7 +446,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw) ctx->char_off = 0; - token_handler(&t, pw); + return token_handler(&t, pw); } else if (strlen(expstr + ctx->char_off) > token->data.character.len) { /* Tokeniser output only contained part of the data diff --git a/test/tokeniser3.c b/test/tokeniser3.c index 416ff5d..eb921ce 100644 --- a/test/tokeniser3.c +++ b/test/tokeniser3.c @@ -447,7 +447,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw) /* Expected token only contained part of the data * Calculate how much is left, then try again with * the next expected token */ - hubbub_token t; + hubbub_token t = *token; t.type = HUBBUB_TOKEN_CHARACTER; t.data.character.ptr += len; @@ -455,7 +455,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw) ctx->char_off = 0; - token_handler(&t, pw); + return token_handler(&t, pw); } else if (strlen(expstr + ctx->char_off) > token->data.character.len) { /* Tokeniser output only contained part of the data |