Ensure pack is initialised when loading an asset pack

This commit is contained in:
Abdelrahman Said 2023-11-05 15:04:58 +00:00
parent e8fbe275f7
commit 90b5acd002

View File

@ -128,6 +128,8 @@ asset_pack_t *load_asset_pack(const char *filepath) {
return NULL; return NULL;
} }
memset((void *)pack, 0, sizeof(asset_pack_t));
pack->fp = fopen(full_path, "rb"); pack->fp = fopen(full_path, "rb");
if (!(pack->fp)) { if (!(pack->fp)) {
close_asset_pack(&pack); close_asset_pack(&pack);