INNER CODE UNIT · C
pak
tek256/astera · src/asset.c:241
pak_t* pak = (pak_t*)calloc(1, sizeof(pak_t));
if (!pak) {
ASTERA_FUNC_DBG("unable to alloc pak_t\n");
fclose(f);
return 0;
}
pak->count = header.count;
pak->data.filepath = file;
// Seek to the end of the header size (start of entries)
fseek(f, sizeof(pak_header_t), SEEK_SET);
pak->files = (pak_file_t*)calloc(header.count, sizeof(pak_file_t));
if (!pak->files) {
ASTERA_FUNC_DBG("unable to allocate space for entries\n");