summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2017-02-04 11:51:18 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2017-02-04 12:01:58 (GMT)
commit40ae669964146b36ad797bdbb931c5967e7f13fd (patch)
treeafe67512ae4dc84a98ce1816b89ac78125d82b3b
parent43d0b6a8b4cc923a53d6e09357811f839a2a32e1 (diff)
downloadlibnslayout-40ae669964146b36ad797bdbb931c5967e7f13fd.tar.gz
libnslayout-40ae669964146b36ad797bdbb931c5967e7f13fd.tar.bz2
test loader: Only try to parse chunk lengths greater than zero.
-rw-r--r--test/test-loader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test-loader.c b/test/test-loader.c
index 9f56f87..1131790 100644
--- a/test/test-loader.c
+++ b/test/test-loader.c
@@ -97,7 +97,7 @@ bool test_loader_doc_load_next(
if (chunk_length > (load_ctx->html->len - load_ctx->html->pos))
chunk_length = load_ctx->html->len - load_ctx->html->pos;
- if (chunk_length != 0) {
+ if (chunk_length > 0) {
/* Parse the chunk */
error = dom_hubbub_parser_parse_chunk(load_ctx->parser,
load_ctx->html->buf + load_ctx->html->pos,