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

Improve serialization bytes from variant #64

Merged
merged 5 commits into from
Mar 5, 2019

Conversation

conr2d
Copy link
Contributor

@conr2d conr2d commented Feb 28, 2019

Changes

  • Check bytes size before serialization
    Restore check size condition that seems to be deleted by mistake

  • Strip 0x prefix during bytes serialization
    Allow hex string for byte array to contain 0x prefix

  • Parse odd-number length hex string during bytes serialization
    1FF will be serialized as 1F, because last digit is ignored when the length of string is odd. Unless throwing an exception for odd-length hex string, it had better serialize 1FF as 01FF to have intended value.

src/variant.cpp Show resolved Hide resolved
src/variant.cpp Outdated Show resolved Hide resolved
@arhag arhag merged commit 0c348cc into EOSIO:master Mar 5, 2019
MatusKysel added a commit to abilitiinc/AbilitiX that referenced this pull request May 22, 2019
@conr2d conr2d deleted the bytes-from-variant branch October 21, 2020 04:52
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.

2 participants