Fix builder

Now, raylua_e can be used in the same way than LÖVE and luvi.
This commit is contained in:
TSnake41 2020-04-01 18:18:06 +02:00
parent ce6a446b70
commit 105775b651

View File

@ -77,8 +77,6 @@ static int raylua_builder_new(lua_State *L)
}
append_file(f, self);
fgetpos(f, &builder->offset); /* get eof offset */
fclose(self);
if (!mz_zip_writer_init_cfile(&builder->zip, f, 0)) {
@ -110,10 +108,6 @@ static int raylua_builder_close(lua_State *L)
raylua_builder *builder = lua_touserdata(L, -1);
mz_zip_writer_finalize_archive(&builder->zip);
/* Write offset */
fwrite(&builder->offset, sizeof(fpos_t), 1, builder->file);
fclose(builder->file);
free(builder);
return 0;
}