diff options
author | Josh Haberman <jhaberman@gmail.com> | 2015-05-08 17:20:55 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2015-05-08 17:20:55 -0700 |
commit | 838009ba2b8ea1e99061c66e0fbd9cb53a96ec20 (patch) | |
tree | da3cbc97eed1eb70af5e0f3a687ff37ad239d119 /upb/bindings/lua/upb.c | |
parent | fa10302a502de38a66ed921eeeacb4107e9572a2 (diff) |
Fixes for the open-source build.
Diffstat (limited to 'upb/bindings/lua/upb.c')
-rw-r--r-- | upb/bindings/lua/upb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/upb/bindings/lua/upb.c b/upb/bindings/lua/upb.c index 5ad0235..b35af24 100644 --- a/upb/bindings/lua/upb.c +++ b/upb/bindings/lua/upb.c @@ -1358,7 +1358,7 @@ static size_t align_up(size_t val, size_t align) { // If we always read/write as a consistent type to each value, this shouldn't // violate aliasing. -#define DEREF(msg, ofs, type) *(type*)(&msg->data[ofs]) +#define DEREF(msg, ofs, type) *(type*)((char*)msg + sizeof(lupb_msg) + ofs) lupb_msg *lupb_msg_check(lua_State *L, int narg) { lupb_msg *msg = luaL_checkudata(L, narg, LUPB_MSG); |