Browse Source

Prevent C compiler undefined-behavior optimization.

Mike Pall 3 years ago
parent
commit
bb7a30727e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lj_obj.h

+ 1 - 1
src/lj_obj.h

@@ -420,7 +420,7 @@ typedef struct GCtab {
 } GCtab;
 
 #define sizetabcolo(n)	((n)*sizeof(TValue) + sizeof(GCtab))
-#define tabref(r)	(&gcref((r))->tab)
+#define tabref(r)	((GCtab *)gcref((r)))
 #define noderef(r)	(mref((r), Node))
 #define nextnode(n)	(mref((n)->next, Node))