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 the number of NEWARR #220

Merged
merged 6 commits into from
Mar 29, 2020
Merged

Fix the number of NEWARR #220

merged 6 commits into from
Mar 29, 2020

Conversation

Tommo-L
Copy link
Contributor

@Tommo-L Tommo-L commented Mar 25, 2020

Close #212

This reason is that when create a byte array, the size of array may over 16, which opcode is PUSHDATA[1,24] CONVERT(Integer)

@lightszero @shargon @ProDog plz, have a reivew.

@@ -1153,17 +1153,20 @@ private int ConvertNewArr(ILMethod method, OpCode src, NeoMethod to)
{
var code = to.body_Codes.Last().Value;

if (code.code == VM.OpCode.CONVERT)
code = to.body_Codes.TakeLast(2).First().Value;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here, we lost one remove operation before.

@Tommo-L Tommo-L changed the title Fix storage put Fix the length of NEWARR Mar 25, 2020
@Tommo-L Tommo-L changed the title Fix the length of NEWARR Fix the number of NEWARR Mar 25, 2020
@ProDog
Copy link
Contributor

ProDog commented Mar 25, 2020

I have tested it passed.

image

image

@lightszero lightszero merged commit 6c12831 into neo-project:master Mar 29, 2020
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.

A contract compile error when Storage.Put byte[]
5 participants