oniksan / godobuf

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

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

Closed panorb closed 3 months ago

panorb commented 4 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.