Closed vlad-ilyushchenko closed 12 years ago
I will fix this soon.
Can you provide a unit test which fails currently?
It isn't a unit test per se, this code prompted me to have a look:
Excerpt excerpt = currentTsc.createExcerpt();
try {
excerpt.index(index);
excerpt.skipBytes(offset);
return excerpt.readInt();
} finally {
excerpt.finish();
}
After excerpt.index() call position field is set to a rather large offset and is reset to "offset" value when skipBytes() is called.
Cheers, Vlad
-----Original Message----- From: Peter Lawrey [mailto:reply@reply.github.com] Sent: 26 March 2012 10:01 To: Ilyuschenko, Vlad Subject: Re: [Java-Chronicle] incorrect pointer math in AbstractExcerpt.position() (#6)
Can you provide a unit test which fails currently?
Reply to this email directly or view it on GitHub: https://github.com/peter-lawrey/Java-Chronicle/issues/6#issuecomment-4690170
Fixed now
i noticed that skipBytes() doesn't work correctly, it turned out to be a problem with position(). this code works: