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 longer output than return length in call opcode #454

Merged
merged 2 commits into from
Feb 26, 2019

Conversation

s1na
Copy link
Contributor

@s1na s1na commented Feb 25, 2019

Fixes the case where outLength in CALL is longer than the actual data returned, which resulted in the difference being overwritten with zeros. This fixes the CallIdentity_6_inputShorterThanOutput test case.

@holgerd77
Copy link
Member

Rebased this.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.007%) to 94.275% when pulling 2fab756 on fix/call-id-test into 3a06f0c on master.

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Looks good, cool! 👍

@holgerd77 holgerd77 merged commit ea0e29e into master Feb 26, 2019
@holgerd77 holgerd77 deleted the fix/call-id-test branch February 26, 2019 10:52
const dataLength = localOpts.outLength.toNumber()
let dataLength = localOpts.outLength.toNumber()
if (results.vm.return.length < dataLength) {
dataLength = results.vm.return.length
Copy link
Member

Choose a reason for hiding this comment

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

Could use Math.min to collapse into a single line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants