diff options
Diffstat (limited to 'src/tokeniser')
-rw-r--r-- | src/tokeniser/tokeniser.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tokeniser/tokeniser.c b/src/tokeniser/tokeniser.c index 1fdaddb..3d07194 100644 --- a/src/tokeniser/tokeniser.c +++ b/src/tokeniser/tokeniser.c @@ -596,11 +596,9 @@ hubbub_error hubbub_tokeniser_run(hubbub_tokeniser *tokeniser) #define COLLECT_MS(str, cptr, length) \ do { \ - if ((str).len == 0) { \ - START_BUF(str, (uint8_t *)cptr, length); \ - } else { \ - COLLECT(str, cptr, length); \ - } \ + parserutils_buffer_append(tokeniser->buffer, \ + (uint8_t *) cptr, (length)); \ + (str).len += (length); \ } while (0) |