aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c-api/compat-5.3.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/c-api/compat-5.3.c b/c-api/compat-5.3.c
index 590e3c8..be7f87e 100644
--- a/c-api/compat-5.3.c
+++ b/c-api/compat-5.3.c
@@ -448,7 +448,9 @@ static const char *compat53_reader (lua_State *L, void *ud, size_t *size) {
448 448
449COMPAT53_API int lua_load (lua_State *L, lua_Reader reader, void *data, const char *source, const char *mode) { 449COMPAT53_API int lua_load (lua_State *L, lua_Reader reader, void *data, const char *source, const char *mode) {
450 int status = LUA_OK; 450 int status = LUA_OK;
451 compat53_reader_data compat53_data = { reader, data, 1, 0, 0 }; 451 compat53_reader_data compat53_data = { 0, NULL, 1, 0, 0 };
452 compat53_data.reader = reader;
453 compat53_data.ud = data;
452 compat53_data.peeked_data = reader(L, data, &(compat53_data.peeked_data_size)); 454 compat53_data.peeked_data = reader(L, data, &(compat53_data.peeked_data_size));
453 if (compat53_data.peeked_data && compat53_data.peeked_data_size && 455 if (compat53_data.peeked_data && compat53_data.peeked_data_size &&
454 compat53_data.peeked_data[0] == LUA_SIGNATURE[0]) /* binary file? */ 456 compat53_data.peeked_data[0] == LUA_SIGNATURE[0]) /* binary file? */