From 838009ba2b8ea1e99061c66e0fbd9cb53a96ec20 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Fri, 8 May 2015 17:20:55 -0700 Subject: Fixes for the open-source build. --- upb/bindings/lua/upb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upb/bindings/lua/upb.c') 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); -- cgit v1.2.3