mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-01 09:51:12 +00:00
This reverts commit 1cb1c4baee.
This commit is contained in:
parent
72e51c61f7
commit
0f469cad54
2 changed files with 2 additions and 7 deletions
|
|
@ -438,8 +438,7 @@ namespace Google.FlatBuffers
|
|||
if (off > Offset)
|
||||
throw new ArgumentException();
|
||||
|
||||
if (off != 0)
|
||||
off = Offset - off + sizeof(int);
|
||||
off = Offset - off + sizeof(int);
|
||||
PutInt(off);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,11 +65,7 @@ namespace Google.FlatBuffers
|
|||
// Create a .NET String from UTF-8 data stored inside the flatbuffer.
|
||||
public string __string(int offset)
|
||||
{
|
||||
int stringOffset = bb.GetInt(offset);
|
||||
if (stringOffset == 0)
|
||||
return null;
|
||||
|
||||
offset += stringOffset;
|
||||
offset += bb.GetInt(offset);
|
||||
var len = bb.GetInt(offset);
|
||||
var startPos = offset + sizeof(int);
|
||||
return bb.GetStringUTF8(startPos, len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue