Skip to content

Cannot use protobuf #1702

@darkweak

Description

@darkweak

The following program sample.go triggers an unexpected result

package main

var item = []byte(`YOUR_PB_BYTE`)

func main() {
	mapping := &StorageMapper{}
	if len(item) != 0 {
		e = proto.Unmarshal(item, mapping)
		if e != nil {
			panic(e)
		}
	}
}

Expected result

It should run

Got

CFG post-order panic: runtime error: index out of range [1] with length 0

Yaegi Version

latest

Additional Notes

No response

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