Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

[Bug?] Leading 0x00 of PUSH opcode argument value is deleted #226

Closed
minaminao opened this issue Nov 3, 2022 · 2 comments
Closed

[Bug?] Leading 0x00 of PUSH opcode argument value is deleted #226

minaminao opened this issue Nov 3, 2022 · 2 comments

Comments

@minaminao
Copy link

#define macro MAIN() = takes (0) returns (0) {
    0x1111 // PUSH2 0x1111  [0x1111]
    0x0011 // PUSH1 0x11    [0x11, 0x1111]   <- I expected PUSH2 0x0011
    pc     // PC            [0x5]            <- I expected [0x6]
}

It causes unexpected bugs using PC :)

@refcell
Copy link
Collaborator

refcell commented Feb 27, 2023

As requested in #244, we now support what are called "push overrides". This allows you to explicitly prefix hex literals with PUSH opcodes as of our merge into #220. Hopefully this answers your question. If not, feel free to comment/re-open the issue :)

@refcell refcell closed this as completed Feb 27, 2023
@minaminao
Copy link
Author

Push override is great! Thank you

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

No branches or pull requests

2 participants