Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

細節錯誤 #32

Closed
bominn opened this issue Apr 9, 2021 · 1 comment
Closed

細節錯誤 #32

bominn opened this issue Apr 9, 2021 · 1 comment

Comments

@bominn
Copy link

bominn commented Apr 9, 2021

hi 感謝對 flatbuffer encode 的詳細解說,
雖然沒寫過 go 但還是大致了解了 encode 的原理了

FlatBuffers 之 Encode 內序列化 table 的部分

最后一步需要修正 sword 对象头部的 offset,修改成距离 vtable 的 offset。由于当前 vtable 在低地址,所以 sword 对象在它的右边,offset 为正数,offset = vtable size = 8 字节。对应代码实现见第 10 步。

看起來第9步才是對的

@halfrost
Copy link
Owner

@bominn 谢谢你指出错误,已经更正啦。

@halfrost halfrost closed this as completed Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants