oniksan / godobuf

A Google Protobuf implementation for Godot / GDScript
BSD 3-Clause "New" or "Revised" License
248 stars 34 forks source link

Change map fields to be optional (fixes decoding error) #44

Closed panorb closed 1 month ago

panorb commented 2 months ago

This pull request fixes an issue where maps only decoded their first key-value pair and then errored out with a PB_ERR.REQUIRED_FIELDS error code.

This changes the field definition in a way that also matches the Language Guide (proto 2) section about Backwards Compatibility. After the change the map fields decode properly.