From c382af789c6c87382676161742a1f8c68b4448b4 Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Sat, 7 Dec 2019 11:26:37 -0500 Subject: [PATCH] sanity check --- source/pr_load.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/pr_load.c b/source/pr_load.c index 20872f0..77d3e46 100644 --- a/source/pr_load.c +++ b/source/pr_load.c @@ -123,6 +123,9 @@ static void PR_LoadDef(ddef_t *def, byte const **data) def->type = ReadLittleShort(data); def->ofs = ReadLittleShort(data); def->s_name = ReadLittleLong(data); + + if(def->ofs % 4 != 0) + Host_Error("PR_LoadDef: offset must be 4 byte aligned"); } static void PR_LoadGlobalDefs(byte const *data)