From 90510a89b93775ea7f7b684f96a8f19c829c33f0 Mon Sep 17 00:00:00 2001 From: Cloudwalk Date: Tue, 21 Jul 2020 15:07:24 -0400 Subject: [PATCH] prvm_edict: Add missing typecasts to fix alignment problem --- prvm_edict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prvm_edict.c b/prvm_edict.c index fa6ecbc3..1f8700c9 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -2126,8 +2126,8 @@ void PRVM_Prog_Load(prvm_prog_t *prog, const char * filename, unsigned char * da default: for (i=0 ; inumglobaldefs ; i++) { - prog->globaldefs[i].type = LittleShort(inglobaldefs16[i].type); - prog->globaldefs[i].ofs = LittleShort(inglobaldefs16[i].ofs); + prog->globaldefs[i].type = (unsigned short)LittleShort(inglobaldefs16[i].type); + prog->globaldefs[i].ofs = (unsigned short)LittleShort(inglobaldefs16[i].ofs); prog->globaldefs[i].s_name = LittleLong(inglobaldefs16[i].s_name); // TODO bounds check ofs, s_name } -- 2.39.2