about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lstate.c b/src/lstate.c
index ee088be..94f51c7 100644
--- a/src/lstate.c
+++ b/src/lstate.c
@@ -141,7 +141,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
   void *l = (*f)(ud, NULL, 0, sizeof(LG));
   if (l == NULL) return NULL;
   L = cast(lua_State*, l);
-  g = &cast(LG *, L)->g;
+  g = &cast(LG *, l)->g;
   L->next = NULL;
   L->tt = LUA_TTHREAD;
   g->currentwhite = bit2mask(WHITE0BIT, FIXEDBIT);