aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2013-03-01 02:46:10 +0400
committerIvan Kluchnikov <kluchnikovi@gmail.com>2013-03-01 02:46:10 +0400
commit44408456141f94a716c7cd8c339ecd4bc05341b6 (patch)
treefdddc19dd81b80bfaaa21ce844b4df7d05f54f54
parent5dc29a51efdc9fa10892e441cef9a614d5d00599 (diff)
Fixed decoding and encoding of CSN_RECURSIVE_TARRAY, CSN_RECURSIVE_TARRAY_1, CSN_RECURSIVE_TARRAY_2.
We should offset pointer to data after each iteration.
-rw-r--r--src/csn1.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/csn1.cpp b/src/csn1.cpp
index 1859beb..38d8860 100644
--- a/src/csn1.cpp
+++ b/src/csn1.cpp
@@ -1305,7 +1305,7 @@ csnStreamDecoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector, unsig
csnStream_t arT = *ar;
gint16 Status;
csnStreamInit(&arT, bit_offset, remaining_bits_len);
- Status = csnStreamDecoder(&arT, (const CSN_DESCR*)pDescr->descr.ptr, vector, readIndex, pvDATA(data, pDescr->offset));
+ Status = csnStreamDecoder(&arT, (const CSN_DESCR*)pDescr->descr.ptr, vector, readIndex, pui8);
if (Status >= 0)
{ /* successful completion */
@@ -1366,7 +1366,7 @@ csnStreamDecoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector, unsig
LOGPC(DCSN1, LOGL_NOTICE, "%s { | ", pDescr->sz);
csnStreamInit(&arT, bit_offset, remaining_bits_len);
- Status = csnStreamDecoder(&arT, (const CSN_DESCR*)pDescr->descr.ptr, vector, readIndex, pvDATA(data, pDescr->offset));
+ Status = csnStreamDecoder(&arT, (const CSN_DESCR*)pDescr->descr.ptr, vector, readIndex, pui8);
if (Status >= 0)
{ /* successful completion */
@@ -2562,7 +2562,7 @@ gint16 csnStreamEncoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector
csnStream_t arT = *ar;
gint16 Status;
csnStreamInit(&arT, bit_offset, remaining_bits_len);
- Status = csnStreamEncoder(&arT, (const CSN_DESCR*)pDescr->descr.ptr, vector, writeIndex, pvDATA(data, pDescr->offset));
+ Status = csnStreamEncoder(&arT, (const CSN_DESCR*)pDescr->descr.ptr, vector, writeIndex, pui8);
if (Status >= 0)
{ /* successful completion */
@@ -2628,7 +2628,7 @@ gint16 csnStreamEncoder(csnStream_t* ar, const CSN_DESCR* pDescr, bitvec *vector
ElementCount--;
LOGPC(DCSN1, LOGL_NOTICE, "%s { | ", pDescr->sz);
csnStreamInit(&arT, bit_offset, remaining_bits_len);
- Status = csnStreamEncoder(&arT, (const CSN_DESCR*)pDescr->descr.ptr, vector, writeIndex, pvDATA(data, pDescr->offset));
+ Status = csnStreamEncoder(&arT, (const CSN_DESCR*)pDescr->descr.ptr, vector, writeIndex, pui8);
LOGPC(DCSN1, LOGL_NOTICE, "%s } | ", pDescr->sz);
if (Status >= 0)
{ /* successful completion */