From 60ba1bbd30dc4302bac6888136dc6bf8f9c0c7c7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 2 Apr 2008 20:57:44 +0200 Subject: [PATCH] isamb_pp_forward2 takes into account scope. isamb_pp_forward2 takes into account scope . The function previously assumed scope = 2. --- isamb/isamb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/isamb/isamb.c b/isamb/isamb.c index 26cd9fc..2b69426 100644 --- a/isamb/isamb.c +++ b/isamb/isamb.c @@ -1971,14 +1971,14 @@ int isamb_pp_forward2(ISAMB_PP pp, void *buf, const void *untilb) file_item = file_item_buf; (*b->method->codec.reset)(c1); (*b->method->codec.decode)(c1, &file_item, &src); - if ((*b->method->compare_item)(untilb, file_item_buf) <= 1) + if ((*b->method->compare_item)(untilb, file_item_buf) < pp->scope) { src = src_0; break; } #else decode_item_len(&src, &item_len); - if ((*b->method->compare_item)(untilb, src) <= 1) + if ((*b->method->compare_item)(untilb, src) < pp->scope) break; src += item_len; #endif @@ -2014,14 +2014,14 @@ int isamb_pp_forward2(ISAMB_PP pp, void *buf, const void *untilb) file_item = file_item_buf; (*b->method->codec.reset)(c1); (*b->method->codec.decode)(c1, &file_item, &src); - if ((*b->method->compare_item)(untilb, file_item_buf) <= 1) + if ((*b->method->compare_item)(untilb, file_item_buf) < pp->scope) { src = src_0; break; } #else decode_ptr(&src, &item_len); - if ((*b->method->compare_item)(untilb, src) <= 1) + if ((*b->method->compare_item)(untilb, src) <= pp->scope) break; src += item_len; #endif @@ -2040,7 +2040,7 @@ int isamb_pp_forward2(ISAMB_PP pp, void *buf, const void *untilb) src = p->bytes + p->offset; (*pp->isamb->method->codec.decode)(p->decodeClientData, &dst, &src); p->offset = src - (char*) p->bytes; - if (!untilb || (*pp->isamb->method->compare_item)(untilb, dst0) <= 1) + if (!untilb || (*pp->isamb->method->compare_item)(untilb, dst0) < pp->scope) break; dst = dst0; if (p->offset == p->size) goto again; -- 1.7.10.4