Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue causing lobs to skip some bytes when doing partial reads #190

Merged
merged 5 commits into from
Aug 13, 2020

Conversation

dlurton
Copy link
Contributor

@dlurton dlurton commented Aug 12, 2020

Fixes #188

Also adds regression tests as well.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

tgregg
tgregg previously approved these changes Aug 12, 2020
Copy link
Contributor

@tgregg tgregg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the equivalent API on the binary reader have the same bug?

}

// regression test for https://github.com/amzn/ion-c/issues/188
TEST(IonTextblob, CanFullyReadBlobUsingPartialReadsAfterReadingSize) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IonTextblob -> IonTextBlob

@dlurton
Copy link
Contributor Author

dlurton commented Aug 13, 2020

I've refactored a bit to DRY some and also added equivalent tests for Ion binary. The same bug does not exist for the binary reader.

@dlurton dlurton requested a review from tgregg August 13, 2020 17:08
@derivativerobmc
Copy link

thanks for fixing that so quickly

@dlurton dlurton merged commit 1e911eb into master Aug 13, 2020
@dlurton dlurton deleted the fix-lob-partial-read-bug branch August 13, 2020 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error calculating remaining bytes when reading from text lob stored in value_image
3 participants