Skip to content

opcode opGetByte and opSetByte #2221

@amityadav0

Description

@amityadav0

Subject of the issue

Index check for the set byte should have >=.

In opGetByte

if idx >= uint64(len(target.Bytes)) {

we are checking for equal condition because the indexing assumed here starts from 0.

but in case of opSetByte

if cx.stack[prev].Uint > uint64(len(cx.stack[pprev].Bytes)) {

This one should be same as opGetByte

Please correct me if i am not understanding it right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions