protobuf.js icon indicating copy to clipboard operation
protobuf.js copied to clipboard

bugfix: unexpected output when decoding maps with long keys

Open andrewyang96 opened this issue 2 years ago • 1 comments

protobuf.js version: 7.2.2

Resolves https://github.com/protobufjs/protobuf.js/issues/1203

As illustrated in the attached test, {"1":"2"} is transformed into {"\x01\x00\x00\x00\x00\x00\x00\x00":2} without the decoder fix. Applying util.longToHash to the long key value here isn't necessary

andrewyang96 avatar Mar 07 '23 04:03 andrewyang96

can anyone helps review that bugfix please?

derickweng avatar Nov 22 '23 06:11 derickweng