Skip to content

Commit 0ea4eb1

Browse files
committed
修复 pbbin输出时, 枚举默认值报错
1 parent e27ab3d commit 0ea4eb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v3/gen/pbdata/func.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func tableValue2PbValue(globals *model.Globals, cellValue string, valueType *mod
8585
if globals.Types.IsEnumKind(pbType) {
8686

8787
if cellValue == "" {
88-
return protoreflect.ValueOfInt32(0)
88+
return protoreflect.ValueOfEnum(protoreflect.EnumNumber(0))
8989
}
9090
enumValue := globals.Types.ResolveEnumValue(pbType, cellValue)
9191

0 commit comments

Comments
 (0)