This commit is contained in:
2026-08-17 01:21:55 +02:00
parent 5761d6e67a
commit 4bd1e24e75
265 changed files with 20617 additions and 24457 deletions
+2 -1
View File
@@ -438,7 +438,8 @@ namespace Google.FlatBuffers
if (off > Offset)
throw new ArgumentException();
off = Offset - off + sizeof(int);
if (off != 0)
off = Offset - off + sizeof(int);
PutInt(off);
}
+5 -1
View File
@@ -65,7 +65,11 @@ namespace Google.FlatBuffers
// Create a .NET String from UTF-8 data stored inside the flatbuffer.
public string __string(int offset)
{
offset += bb.GetInt(offset);
int stringOffset = bb.GetInt(offset);
if (stringOffset == 0)
return null;
offset += stringOffset;
var len = bb.GetInt(offset);
var startPos = offset + sizeof(int);
return bb.GetStringUTF8(startPos, len);