If protobuf contains empty string then on_start_string is called with size_hint set to 0, and on_string callback is never invoked, therefore SV is never initialized with any value and is undef. To fix that, this patch checks if size_hint is zero in on_start_string, and if it is then string is initialized with empty string.
If protobuf contains empty string then
on_start_string
is called withsize_hint
set to 0, andon_string
callback is never invoked, therefore SV is never initialized with any value and isundef
. To fix that, this patch checks ifsize_hint
is zero inon_start_string
, and if it is then string is initialized with empty string.