Skip to content

Commit

Permalink
Corecting wihh offset limit to use entry size of 64 bytes insteads of 2
Browse files Browse the repository at this point in the history
  • Loading branch information
wench committed Jan 13, 2025
1 parent 7c5e95d commit 0be2db3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shapes/shapevga.cc
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ bool Shapes_vga_file::read_info(
for (size_t i = 0; i < cnt; i++) {
// A zero offset means there is no record also ignore invalid
// offsets past the end of the file or point into the offset table
if (offsets[i] == 0 || offsets[i] > (wihh.getSize() - 2)
if (offsets[i] == 0 || offsets[i] > (wihh.getSize() - 64)
|| offsets[i] < 2048) {
info[i].weapon_offsets = nullptr;
} else {
Expand Down

0 comments on commit 0be2db3

Please sign in to comment.