Просмотр исходного кода

Fixed bug with oneofs in JSON decoding.

Joshua Haberman 5 лет назад
Родитель
Сommit
4936abe813
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      php/ext/google/protobuf/php-upb.c

+ 1 - 1
php/ext/google/protobuf/php-upb.c

@@ -6794,7 +6794,7 @@ static void jsondec_field(jsondec *d, upb_msg *msg, const upb_msgdef *m) {
     return;
   }
 
-  if (upb_fielddef_containingoneof(f) &&
+  if (upb_fielddef_realcontainingoneof(f) &&
       upb_msg_whichoneof(msg, upb_fielddef_containingoneof(f))) {
     jsondec_err(d, "More than one field for this oneof.");
   }