Skip to content

Useless encoded data #606

@osechet

Description

@osechet

protobuf.js version: 6.3.1

Using the following message,

message Response {
    fixed32 id = 1;
    bytes data = 2;
    string error = 3;
}

when calling Response.encode(Response.create({error: 'error'})).finish(), I get: [18, 0, 26, 5, 101, 114, 114, 111, 114].

The 2 first bytes are useless.

If I call Response.encode({error: 'error'}).finish(), I get [26, 5, 101, 114, 114, 111, 114] which is fine.

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