google / flatbuffers

FlatBuffers: Memory Efficient Serialization Library
https://flatbuffers.dev/
Apache License 2.0
22.56k stars 3.19k forks source link

--force-empty only support cpp ? #8208

Open Lynnworld opened 6 months ago

Lynnworld commented 6 months ago

Hello , I wrote a golang app comunicate to a app c++, while using flatc I found --force-empty not working in golang. it gennerate some code like

        type_Offset := flatbuffers.UOffsetT(0)
    if t.Type != "" {
        type_Offset = builder.CreateString(t.Type)
    }

it mean no field in builder while accessing it in C++ , I got 0 so coredump.