FFI: Fix compiled ffi.string() semantics.

This commit is contained in:
Mike Pall
2011-02-28 19:46:55 +01:00
parent 83a37aeca7
commit e1aa8d0d97
5 changed files with 8 additions and 5 deletions

View File

@@ -713,7 +713,7 @@ LUA_API void lua_concat(lua_State *L, int n)
copyTV(L, L->top-1, L->top);
} while (--n > 0);
} else if (n == 0) { /* Push empty string. */
setstrV(L, L->top, lj_str_new(L, "", 0));
setstrV(L, L->top, &G(L)->strempty);
incr_top(L);
}
/* else n == 1: nothing to do. */