Skip to content

Commit

Permalink
asset: add EOM asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
rasky committed Aug 11, 2023
1 parent ad526fe commit 018fd91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/asset.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ void *asset_load(const char *fn, int *sz)
case 2: {
size = header.orig_size;
s = memalign(16, size);
assertf(s, "asset_load: out of memory");
int n = decompress_lz5h_full(f, s, size); (void)n;
assertf(n == size, "asset: decompression error on file %s: corrupted? (%d/%d)", fn, n, size);
} break;
Expand All @@ -88,6 +89,7 @@ void *asset_load(const char *fn, int *sz)
}

s = memalign(16, bufsize);
assertf(s, "asset_load: out of memory");
int n;

#ifdef N64
Expand Down

0 comments on commit 018fd91

Please sign in to comment.