From 0be2db3dd8fac9a8392459c1598b4efeb13363f4 Mon Sep 17 00:00:00 2001 From: Alexis Ryan Date: Tue, 14 Jan 2025 08:53:32 +1100 Subject: [PATCH] Corecting wihh offset limit to use entry size of 64 bytes insteads of 2 --- shapes/shapevga.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shapes/shapevga.cc b/shapes/shapevga.cc index 531f9fc4f..8eda89fdd 100644 --- a/shapes/shapevga.cc +++ b/shapes/shapevga.cc @@ -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 {